Hi,I m new to designer.
Please tell me how following formula can be written in lotus script.
a:=@Adjust(sdate;0;0;7;0;0;0);“”);
@SetField(“sdate”;a);
where sdate is a field.
want script for currently open document.
Please help me asap.
Hi,I m new to designer.
Please tell me how following formula can be written in lotus script.
a:=@Adjust(sdate;0;0;7;0;0;0);“”);
@SetField(“sdate”;a);
where sdate is a field.
want script for currently open document.
Please help me asap.
Subject: adjust date via lotus script
Dim ws As New NotesUIWorkspaceDim uidoc As NotesUIDocument
Dim dt As NotesDateTime
Set uidoc = ws.CurrentDocument
Set dt = New NotesDateTime(uidoc.FieldGetText(“sdate”))
Call dt.AdjustDay(7)
Call uidoc.FieldSetText(“sdate”,Cstr(dt.DateOnly))
Subject: running Via lotus script
Hi Thanks, its running fine but its running only in edtit mode,is there any way where we can run this in normal mode without going in edit one.
Subject: adjust date via lotus script
See at this line I am resetting dt to its sdate field. and while setting any value to uidoc it must be in edit mode. If you don’t want to set this value to that field remove below line.Call uidoc.FieldSetText(“sdate”,Cstr(dt.DateOnly))
Other thing is that if you really wanted to set this value do this.
1st Workout…
uidoc.EditMode = true
Call uidoc.FieldSetText(“sdate”,Cstr(dt.DateOnly))
uidoc.editMode = false
2nd Workout…
dim doc as notesdocument
set doc = uidoc.document
doc.sdate(0) = dt.dateonly
call doc.save(true,false)
Hope this helps you…
Best Luck…
Subject: work
It will work