In my form there are four field which contain date for plan . another four field is for actual completion date for that plan .
what i have to do i have to compare all plan date with the current date and if current date is greater than the plan date and actual completion date field is empty in that case mail notification should go to some abc123@lotus.com mail address .
for this can anyone give me code for agent or…
condition for mail notification is
Current Date > Plan Date & Actual date =“Blank”
and there is four seperate-seperate fields for Plan date and actual date .
Subject: How to compare between dates and send mail accordingly
SuggestionsAdd a computed field to your form to test out when your formula becomes true. This way you can insert various dates and see how the formula evaluates. You should group your conditions with parentheses, such as
(Current Date > Plan Date) & (Actual date =“”)
Once you have the formula that works, you can use this in an agent with @mailsend to send a doclink to the overdue document.
Also to test if a field is blank, you can use FIELDNAME=“” or FIELDNAME=NULL. You may want to use input validation formulas on the form to force the user to supply a date for all required fields.
Subject: RE: How to compare between dates and send mail accordingly
yes mark , i did that coz already there are 4 editable and 4 computed field for each plan date and actual date . it works in two phase in first phase all editable plan date is visible and actual date is hidden . after filling all plan date when submits this form comes again and at time all plan date is in computed form and actual date is in editable form . and when all plan date is filled and submitted at that time copy to mail goes to 10 users whose name i have entered .
i’ll try to make it clear by my agent ;
doc.saveoptions=“1”
If doc.dlgHOD3(0) = "" Or doc.dlgHOD3(0) = "Select" Then
approve "0",doc.dlgHOD1(0),"1"
Else
approve "0",doc.dlgHOD2(0),"2"
End If
Elseif(doc.txtflag(0)="1") Then
If doc.rdHOD1approval(0)="Accepted" Then
approve "1",doc.dlghod2(0),"2"
Elseif doc.rdHOD1approval(0)="Request For Additional Information" Then
modify "1","1a"
Else
reject("1")
End If
Elseif(doc.txtflag(0)="2") Then
If doc.rdhod2approval(0)="Accepted" Then
If doc.ACDate1(0)<>"" And doc.ACDate2(0)<>"" And doc.ACDate3(0)<>"" Then
approve "2",doc.dlgHOD3(0),"3"
Else
Maildoc.CopyTo=array
approve"2",doc.dlgHOD2(0),"2"
End If
Elseif doc.rdhod2approval(0)="Modifications Required" Then
modify "2","2a"
Else
reject("2")
End If
all the computed plan date name is pdate1 , pdate2,pdate3,pdate 4 and for actual computed date it is adate1,adate2,adate3,adate4 .
so could you plz clear style of writing script in agent , and formula for field .