I’m a little stuck on how to do something that I believe is fairly easy. I’m working on a custom application that has customer information in it including contacts. In my contact form I have CompanyName, address, city, state, etc. I made a button that performs a lookup on the text entered into the CompanyName field. But when there’s multiple documents with the same company in the addressbook I get multiple addresses returned. I want to be prompted to pick one and have my fields filled in with that. The lookup works fine but I’m not sure how to prompt the user correctly and use his response to determine the correct fields. Any help would be appreciated.
FIELD temp1 := @DbLookup(“” : “NoCache”; “” : “”; “lookup”; CompanyName; “OfficeStreetAddress”);
FIELD OfficeStreetAddress := temp1;
Subject: @dblookup and multiple matching documents
FIELD temp1 := @DbLookup(“” : “NoCache”; “” : “”; “lookup”; CompanyName; “OfficeStreetAddress”); FIELD OfficeStreetAddress := temp1;
@Prompt([OKCANCELLIST]; “Select address”; “Select an address from list”; “”; temp1);
Regards
Litty Joseph
Subject: RE: @dblookup and multiple matching documents
OK so the code below would give me the the address, but I don’t want to prompt the user 6 times. Now that I know the company Name and address can I do some kind of double lookup based on the two fields I know to give me the rest?
FIELD temp1 := @DbLookup(“” : “NoCache”; “” : “”; “lookup”; CompanyName; “OfficeStreetAddress”);
FIELD OfficeStreetAddress := @Prompt([OKCANCELLIST]; “Select address”; “Select an address from list”; “”; temp1);
Subject: RE: @dblookup and multiple matching documents
I figured it out, used @member to see what position the address that got selected was in the list and then used @subset to extract that position out of the other lists. Thanks for the getting me going in the right direction!