Domino Code Fragment

Code Name*
Retrieving values from within a field
Date*
04/28/2024
Source (or email address if you prefer)*
Rlatulippe@romac.com
IP address:.18.216.32.116
Description*
This formula retrieves value from a field and creates a dialog box containing a list, using the Formula One Toolkit function calls. In this case, the button, when pressed, goes into another database, called Name & Address Book, looks up a group document for the group Portfolio Managers, retrives all names in that group, then places them in a dialog box. TYhe user chooses one, which is placed in the other database where this button is. Found in WWCR on the Fund form, button labeled "PortFolio Managers"
Type*
Formula
Categories*
(Misc)
Implementation:
Required Client:
Server:
Limitations:
Comments:
Files/Graphics attachments (if applicable): Code:
REM "Lookup to the group document in the PNAB for names within the group members field";
REM "Looks up the NAB, then finds Groups View, called Groups, then Group Name called";
REM "Portfolio Managers, then field name in group document called members";
FUNPortMan := @DbCommand("Form1" : "NoCache"; "FieldGet"; "FTLNS1 / FTL / FTG" : "names.nsf"; "Groups"; "PortfolioManagers"; "Members");
REM "Clean up the names so only the first and last names display in the dialog box";
FIELD FUNPortMan := @Name([CN]; FUNPortMan);
@If(
@IsError(FUNPortMan);
@Prompt([OK]; "Error"; @Text(FUNPortMan));
""
);
REM "Creates a dialog box with a list of names from that members field in the group document";
Person := @DbCommand("Form1" : "NoCache"; "DlgListBox"; "Portfolio Managers"; "Please select a Portfolio Manager from the list below..."; ""; FUNPortMan);
@If(
@IsError(Person);
@Prompt([OK]; "Error Message"; @Text(Person));
""
);
FIELD FUNPortMan := Person;
""