Domino Code Fragment

Code Name*
Fix Call ID#
Date*
04/28/2024
Source (or email address if you prefer)*
Rlatulippe@romac.com
IP address:.3.21.104.109
Description*
Used in the support Desk application in the Call form for the CallIDNumber Field.
Type*
Formula
Categories*
(Misc)
Implementation:
Required Client:
Server:
Limitations:
Comments:
Files/Graphics attachments (if applicable): Code:
CLASS := "Notes";
CACHE := "Cache";
NOCACHE := "NoCache";
SERVER := @Subset(@DbName; 1);
DATABASE := "";
VIEW := "($CallTrackingNumbers)";
KEY := "XXXX-999999";
COLUMN := 1;

REM "- If call# blank, continue, else (doesnot exist-or-has value) exit formula";
null1 := @If(CallIDNumber = ""; ""; @Return(""));
REM "- If saving, continue, else exit formula";
null2 := @If(@IsDocBeingSaved; ""; @Return(""));

LookUp := @DbColumn(CLASS : NOCACHE; DATABASE; VIEW; COLUMN);

NewNum := @TextToNumber(@Right(@Subset(@If(@IsError(LookUp); "XXXX-000000"; LookUp); -1); 6)) + 1;
Zeros := 6 - @Length(@Text(NewNum));
"XXXX-" + @Repeat("0"; Zeros) + @Text(NewNum)