Domino Code Fragment

Code Name*
Client Contact Time Period
Date*
04/28/2024
Source (or email address if you prefer)*
Rlatulippe@romac.com
IP address:.3.142.53.68
Description*
When determining when a client needs to be contacted after a specified period of time, follow this tip:
Type*
Formula
Categories*
Date/Time Handling
Implementation:
Required Client:
Server:
Limitations:
Comments:
Files/Graphics attachments (if applicable): Code:
TWO OPTIONS:

1) Use a daily macro (Calculate DaysFromContact):

SELECT @IsAvailable(ContactDate);
FIELD DaysFromContact := (@Today - ContactDate) / 86400;
FIELD ResetProcess := "Y";

then you need one more daily macro (since the macros are run alphabetically called ZReset Process)

SELECT @IsAvailable(ResetProcess);
FIELD ResetProcess := @UnAvailable;

Make your view column display the field DaysFromContact. Since the documents have changed, the view index will be recalculated the first time a person opens the view.

2) Only select documents that have a ContactDate in them, and the reset macro only touches the ones that were modified by other macro. For example, what you might really want to know is if the person has not been contacted for a couple of months. The interval would be decided by upper level management (1, 2, 3 or 6 months or maybe a year).

D1 := @Adjust(@Today; 0; -2; 0; 0; 0; 0);
SELECT @IsAvailable(ContactDate) & (ContactDate < D1);
FIELD NeedsContact := "Yes";

You would not need a reset macro, because the document will be edited anyway to change the current ContactDate.