Hi,
In form, I have a computed field with @Now (Date/hour/minutes) as formula.
I create a new document, the field value is correct but if I re-open the document the value displayed is the previous date/time which is displayed (Date/time of creation), well I save the document and re-open it, the Date/value has changed BUT is not now date/time, it’s the Date/time of second saving ?
In fact, to get the right Date/time value, I must do save two times my document!!!
I have tried [SERVERTIME] and [LOCALTIMEONERROR] without success.
Any ideas are welcome,
Thanks,
Thierry
Subject: Web client : @Now in computed field working not properly?
In order to get the computed fields refresh, the document has to change its mode. So when you open, the document will be in the read mode and hence you will not notice any dynamic change to the value of that field. Hence you may have to refresh the document after opening it in edit mode So, use this code in “PostOpen” event of the form if you want to see the dynamic time.
Bring the document to edit mode only, if is not new document.Otherwise gets an error “Document Command Not available”.
Dim ws As New NotesUIWorkspace
Call ws.EditDocument( True )
Call Source.Refresh
Call Source.save ‘If you want to save automatically. For manual save no need’
Try this kind of logic suitable to web in ‘document context’.
Subject: RE: Web client : @Now in computed field working not properly?
Hi Narasimhan,
Thanks for your suggestion but my problem is for a web application, I like your sense of humour 
To solve that, I set the value in WebQueryOpen agent : webDoc.MyField = now()
Strange, because @Now as formula for the computed field worked correctly in R5…
Regards,
Thierry
PS : Stan, UI class in web? Perhaps with Notes/Domino R…2D2 
Subject: RE: Web client : @Now in computed field working not properly?
Stan might have overlooked my last two lines
Subject: RE: Web client : @Now in computed field working not properly?
UI methods on the web? Not gonna work.