Domino Code Fragment

Code Name*
Document Numbers - Unique
Date*
04/28/2024
Source (or email address if you prefer)*
Rlatulippe@romac.com
IP address:.3.149.26.176
Description*
There are times when, for some reason or another, you need a document to behave as a response but it can't be a response because it's a document in it's own right. When faced with this situation I usually create a serial number for the document with this formula. This formula creates a text value containing the users initials and the current time. It looks something like this: JB11-01-93 01:18:15 AM It's accurate to the second so the chances of two serial numbers being the same are very slim. Inheriting this field allow me to sort by serial number and group related documents together. I believe this has advantages over using @UniqueDocumentID. 1. @UniqueDocumentID is undocumented and cannot be depended on. 2. My serial number uses less memory than @UniqueDocumentID
3. My serial number is meaningful. @UniqueDocumentID is not. Using serial numbers allows you to do other things as well. For instance, the "response" documents can add to the serial number. Not only can you identify a common set of documents but you can calculate how many of a particular type of document exist within the set.
Type*
Formula
Categories*
(Misc)
Implementation:
Required Client:
Server:
Limitations:
Comments:
Files/Graphics attachments (if applicable): Code:
First Formula:
@Left(@Name([CN]; @UserName); 1) + @Left(@RightBack(@Name([CN]; @UserName); " "); 1) + @Text(@Now)

Another Formula:
Temp1 := @TextToTime(@If(@Contains(@Platform; "OS/2"); "1-1-"; "1/1/") + @Text(@Right(@Text(@Year(@Now)); 2)) + " 12:00 AM");
Temp2 := @Now - Temp1;
Initials := @Left(@Name([CN]; @UserName); 1) + @V2If(@Right(@Middle(@Name([CN]; @UserName); " "; 2); 1) != "."; "X"; @Middle(@Name([CN]; @UserName); " "; 1)) + @Left(@RightBack(@Name([CN]; @UserName); " "); 1);
Initials + @Right(@Text(@Year(@Now)); 2) + "-" + @Text(Temp2)

which returns something like this:

JBB93-25845643