Domino Code Fragment

Code Name*
Formula for DBLookup and Prompt Box Choose
Date*
04/28/2024
Source (or email address if you prefer)*
Rlatulippe@romac.com
IP address:.52.14.240.178
Description*
Formula for DBLookup and Prompt Box Choose
Type*
Formula
Categories*
(Misc)
Implementation:
Required Client:
Server:
Limitations:
Comments:
Files/Graphics attachments (if applicable): Code:

   ClassCache := "Notes" : "NoCache";


    DbName := "Database Name";

    View := "Lookup View Name";

    Key := Key Field;

    mmContact := @DbLookup(ClassCache; DbName; View; Key; 2);

    ErrorCheck := @If(@IsError(mmContact); @Prompt([YESNO];

    "Error Label"; "messege: ie there are no blank do you wish to create one?"); "");

    @If(ErrorCheck = 1; @Do(@Command([Compose]; "Form Name"); @Return(""));
   ErrorCheck = 0; @Return(""); "");


    mRetVal := @Prompt([OKCANCELLIST]; "Prompt Label"; "Select from the list
   below.";


    @Subset(mmContact; 1); mmContact);

    @PostedCommand([OpenView]; "View Name"; Key Field + mRetVal);

    @PostedCommand([EditDocument]; "0");

    @PostedCommand([OpenView]; "View Name");

    @PostedCommand([FileCloseWindow])