Retrieve Internet Address from Names.nsf

Hello Experts,

Requirement: I designed a customize database in which I wish to retrieve internet address with respect to email like I want to retrieve rpervez@abc.com with respect to rehan pervez/org/abc from names.nsf.

Names.nsf do not have any view which is having email as first column so thats why I am applying a loop which 'll go through from first document to last document in nanes.nsf(people view).

Issue: names.nsf is having around 90k documents so it will take time to retrieve internet address.

Please guide me any alternate solution for the same.

Thanks !!

Subject: Take a look at the function @namelookup

You won’t have to do any dblookup etc. if use that.

Subject: RE: Take a look at the function @namelookup

Many thanks Carl & Karl for your quick help.

I test your given help and will contact you in case of any issue.

Subject: Retrieve Internet Address from Names.nsf

Take a look at this class I posted on my blog almost exactly a year ago:

http://blog.texasswede.com/class-for-domino-directory-lookups/

Subject: RE: Retrieve Internet Address from Names.nsf

Hello Carl,

I created a computed field & applied nameslookup like.

@NameLookup ( [NoUpdate]; @GetField(“name”); “internetAddress”)

Above code is giving me proper internet address.

Issue: I need to save every document bcoz its not showing in my view. One more thing when I apply a loop to save(“Call doc.Save( False, True )”) all documents one by one then its not working and on the other end when I individually call (“@Command([FileSave])”) then its reflecting.

Please help.

Subject: RE: Retrieve Internet Address from Names.nsf

Not sure I really understand your question, as you’re mixing @functions and Lotusscript.

I think you just want to refresh the docs. So take a look at @Command( [ToolsRefreshAllDocs] ) in help.

Subject: RE: Retrieve Internet Address from Names.nsf

Sorry Carl to mix formula nd script.

Situation: I have two fields one is “a” and another is “b”.

a: Having value rehan pervez/org/abc

b: Apply namelookup and return actual internet address like rpervez@abc.com.

  1. I wish to save this document so I’m applying script like doc.save(0,1) - Not working

  2. When I create a button nd write @Command([FileSave]) then it get save i.e show in my view.

I want to apply script to save these all documents by one time click.

--------Script----------

Dim session As New NotesSession

Dim db As NotesDatabase

Dim view As NotesView

Set db = session.CurrentDatabase

Set view = db.GetView("importAddress")

Dim doc As NotesDocument

Set doc=view.GetFirstDocument

While Not doc Is Nothing

	

	Call doc.Save(False,True)

	

	

	Set doc=view.GetNextDocument(doc)

Wend

--------END-----------

Thanks !!!

Subject: RE: Retrieve Internet Address from Names.nsf

Issue has been resolved.

Many thanks Carl nd Karl !!!