Get Multivalue Form A Single Lookup

Using a single DbLookup, retrieve multivalue
ex:Get all customer info in a doc for billing code.
Create a view (Customers)
-first col =Cust_ID Sorted
-second Col=
REM " The order of this list must not be changed!";
REM " However, you may append items to the list, as necessary.";

REM " 1 = ContactName";
REM " Get Address from Mail or Street";
REM " 2 = Address1";
REM " 3 = Address2";
REM " 4 = City";
REM " 5 = State";
REM " 6 = Zip";
REM " 7 = Country";
REM " 8 = ServiceBank";
REM " 9= Prefered language";

@If(ContactName="";"No Contact";ContactName):

@If(MailAddress1 !="";
MailAddress1:MailAddress2: MailCity:MailState:MailZip:MailCountry;
StreetAddress1:StreetAddress2:StreetCity:StreetState:StreetZip:StreetCountry):
@If(Services_1="1";"Yes";"No"):
@If(Language="";"French";Language)


=============

Action or agent

dbCp:=@DbColumn("":"NoCache"; "":""; (Customers); 1);
CompanyList := @If(@IsError(dbCp);"No Customers"; dbCp);

SelectedCompany := @Prompt([OKCANCELLIST]; "Select Customer"; "Please select a
customer from the list below..."; @Subset(CompanyList; 1); CompanyList);

Cancel := @If(SelectedCompany = 0 | SelectedCompany = "No Customers";
@Return(""); "");

CustList:=@DbLookup("Notes":"NoCache"; "":""; (Customers); SelectedCompany; 2);
value:=@If(@IsError(CustList);"";CustList);

FIELD Billable1:= SelectedCompany;

FIELD BillContact1:=@Subset(@Subset(value; 1); -1);
FIELD Bill1Address1:=@Subset(@Subset(value; 2); -1);
FIELD Bill1Address2:=@Subset(@Subset(value; 3); -1);
LookupBillState:=@Subset(@Subset(value; 5); -1);
LookupBillZip:=@Subset(@Subset(value; 6); -1);

FIELD BillCityStateZip1:=@Subset(@Subset(value; 4); -1) + @If(LookupBillState =
""; ""; ", " + LookupBillState) + @If(LookupBillZip = ""; ""; " " +
LookupBillZip) ;
FIELD Country:=@Subset(@Subset(value; 7); -1);
FIELD ServiceBank:=@Subset(@Subset(value; 8); -1);
FIELD PrefLanguage:=@Subset(@Subset(value; 9); -1);

""
This was last published in November 2000

Dig Deeper on Lotus Notes Domino Administration Tools

Start the conversation

Send me notifications when other members comment.

By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Please create a username to comment.

-ADS BY GOOGLE

SearchWindowsServer

Search400

  • iSeries tutorials

    Search400.com'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 ...

SearchEnterpriseLinux

SearchDataCenter

SearchExchange

SearchContentManagement

Close