Hi All, I am having a date field in a form when ever uses changes this date field i want to send mail to a group of people, i have taken care in client by using query mode change , i am capturing this date field in another field in query mode change, when saving i am checking this field value with date field , if there is changes i am sending mail.
how to do it in web, pls advice me.
regds
soma
Subject: how to get a field value in web
You can get the values of any fields within a webform by using lotus script and the documentcontext property. e.g.:
Sub Initialize
Dim session As NotesSession
Set session = New NotesSession
Dim doc As NotesDocument
Set doc = session.DocumentContext
Print "<H2>" + doc.Subject(0) + "</H2>"
End Sub
…use this within a webquerySave agent.
Nathan
Subject: RE: how to get a field value in web
Hi, tahnks for ur reply, u misunderstood my problem, my requirement is i am having a date field, when ever user change the value in this date field i would like to send mail.
pls advice me
regds
soma
Subject: RE: how to get a field value in web
Not sure that I did missunderstand. The issue is to do a comparison between two date fields and to then (if the value has changed) generate an email through the web. You can do this, as previously stated, using a WebQuerySave agent and LotusScript. The session property DocumentContext allows you access to all of the field values of a web document. You can get the field values and then do a comparison:
if date1 <> date2 then
'Send an email
else
'Do something else
End if
…Apologies if I am losing the plot here but this appears to be your answer. I don’t have time to actually present the code here but if you search the designer help for documentcontext you will see plenty of examples.
Nathan
Subject: how to get a field value in web
Hello Soma,
You can use javascript to get the field values on the web. Just use document.forms[0].fieldname.value to get the field value.
You can also use javascript onChange event to assign the change flag on change in the field value.
Hope this helps.
Rgds
Prashant