Domino Code Fragment

Code Name*
Calculating Window Titles
Date*
05/14/2024
Source (or email address if you prefer)*
Rlatulippe@romac.com
IP address:.18.223.108.105
Description*
This example will display New Patient in the window title for new documents, patient (Owner) for existing documents, and patient (Unknown Owner) for existing documents whose owner is unknown. This example is contrived to illustrate a technique, but is useful in understanding how to calculate window titles.
Type*
Formula
Categories*
(Misc)
Implementation:
Required Client:
Server:
Limitations:
Comments:
The key element in this example is the first line: isFldThere = @IsAvailable(ownerName) & ownerName != ""; which sets the variable is FldThere to true or false. The last line actually determines which text is displayed in the title.
Files/Graphics attachments (if applicable): Code:
isFldThere := @IsAvailable (ownerName) & ownerName != "";
if FldYes := patientName + " (" + ownerName + ")";
ifFldNo := patientName + " (Unknown Owner)";
@If(@IsNewDoc; "New Patient"; @If(isFldThere; ifFldYes; ifFldNo))