I want to display the time when a document is created via xpages. In clasic lotus notes I'd use computed when composed field.
A computed field is displaying the current date:
session.createDateTime("Today")
How can I display the current time ( when I compose a document / an xpage ) ?
I tried something like this in a computed field:
var ndt:NotesDateTime = session.createDateTime("Today");
ndt.toJavaDate().toLocaleString()
but it displays the date too and i think every time I opened the doc. the date changes.
For displaying the username, I tried adding a computed label:
if (currentDocument.isNewNote())
{return @Name("[CN]", session.getEffectiveUserName());
}
But, if I re-open the document later, of course the label value is empty, I should add in the else case something like @ThisValue from Lotus Notes.
doc.appendItemValue("yourElement", ndt);? - user3241019