10 pts.
 Lookup in Lotus Notes
Hi, I have a form in lotus, where the user has to select their location from a field. I have a view set up with keywords e.g. Manager, Currency etc. When the user clicks on a fields e.g Manager on the notes form, I want them to see a drop down list which is in the keywords section, but needs to be based on their location. At the moment I am using a DB lookup but this doesnt' seem to work. E.g. User select Australia as location. In Keywords view setup is: Column 1: Manager - Column 2: Australia - Column3: List of Managers. Please help.

Software/Hardware used:
ASKED: August 29, 2008  3:41 PM
UPDATED: September 2, 2008  1:27 PM

Answer Wiki:
If you want the keyword to work based on thier location, I would think the first column should be location, not manager. The second column should be manager. I assume you either have a separate document for each manager that includes his/her location and are categorizing the view on location (first column), then displaying the manager field (second column) or have one document with a location field and a multivalue field for manager name and that is being displayed in the second column. In any case, this code should work as the formula for the manager lookup on the form. In the Choices section of the Field Properties box, choose Use Formula for choices. Enter this forumula. @DbLookup("":"NoCache";"":"";"ManagerByLocation";Location;2) ManagerByLocation is the name of your view. Location is the name of the location field. In the Location field, in the Options section of the Field Properties box, select Refresh Fields On Keyword Change. This will make the Manager field refresh choices if the user changes the Location. Added bonus: Put this in the Translation formula of the Manager field. If there is only one manager for the selected location, it will automatically fill in. If the current manager selection for the current location is no longer valid, the Manager field will be blanked out. Choices := @DbLookup("":"NoCache";"":"";"ManagerByLocation";Location;2); @If(@Elements(Choices) = 1; Choices; Manager != "" & @IsNotMember(Manager; Choices); ""; Manager)
Last Wiki Answer Submitted:  September 2, 2008  1:27 pm  by  Brooklynegg   3,845 pts.
All Answer Wiki Contributors:  Brooklynegg   3,845 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _