Manage Learn to apply best practices and optimize your operations.

Lookup information from the NAB

Lookup information from the NAB (Domino Directory) using @Commands or LotusScript.

Lookup information from the NAB (Domino Directory) using @Commands or LotusScript.
@COMMANDS in a [Button]

tmpName := @Name([CN];@UserName);
FIELD PhoneNumberField := "";

@If(!@IsError(@Subset(@DbLookup("":"NoCache"; "Enter Database 
ReplicaID"; "($Users)";tmpName;"OfficePhoneNumber");1)); @SetField("PhoneNumberField";@Subset(@DbLookup("":"NoCache"; "Enter
Database ReplicaID"; "($Users)"; tmpName;"OfficePhoneNumber");1)); @If(!@IsError(@Subset(@DbLookup("":"NOCACHE";"Enter Database
ReplicaID";"People";tmpName;"OfficePhoneNumber");1)); @SetField("PhoneNumberField";@Subset(@DbLookup("":"NOCACHE";"Enter
Database ReplicaID";"People";tmpName;OfficePhoneNumber);1));
@SetField("PhoneNumberField";"Not Available"))); @Prompt([OK];"Using @Commands";tmpName+"'s phone number is " +
PhoneNumberField) LOTUSSCRIPT in a [Function] Public Function GetOfficePhoneNumber(tmpUser As String) As String On Error Goto processError Dim tmpSession As New NotesSession Forall tmpAddressBook In tmpSession.AddressBooks If tmpAddressBook.IsPublicAddressBook Then tmpAddressBook.Open "","" GetOfficePhoneNumber =
(tmpUser, False)
.OfficePhoneNumber(0) Exit Forall End If End Forall Exit Function processError: GetOfficePhoneNumber = "" Resume Next End Function

Dig Deeper on Domino Resources - Part 7



  • iSeries tutorials's tutorials provide in-depth information on the iSeries. Our iSeries tutorials address areas you need to know about...

  • V6R1 upgrade planning checklist

    When upgrading to V6R1, make sure your software will be supported, your programs will function and the correct PTFs have been ...

  • Connecting multiple iSeries systems through DDM

    Working with databases over multiple iSeries systems can be simple when remotely connecting logical partitions with distributed ...