Andreas Goldman 13.Dec.05 05:09 AM a Web browser Domino Designer 6.0.2 Windows XP
I have an agent which should send mail to selected user (SendTo) some days before ContractDate (=the date after which the contract is unvalid).
It should go through the documents in a view and compare
the ContractDate (field-value) and the current date.
DaysAlarm is a number-field stating how many days before ContractDate the user wants a mail.
My problem is that the formula below only "counts" the days
not the year - so mail is sent on documents "older" than 60
days even in years which already has passed.
Days := DaysAlarm;
NewDate := @Adjust(ContractDate; 0; 0; -Days; 0; 0;0);
@If(@Today >= NewDate; @MailSend(SendTo;"";"";"Contract is out of date !";" ";"Reminder: " : @Text(ContractDate) : "." : " Open document --> "; [IncludeDoclink]);"");