This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal



Apr 5, 2011, 5:56 AM
29 Posts
topic has been resolvedResolved

accessing date value from a repeat control date picker

  • Category: Debugging
  • Platform: All
  • Release: 8.5.2
  • Role: Developer
  • Tags:
  • Replies: 3
Hi,
 
I have a picker on a repeat control, binded to scope as below. The field status and nextAction all update OK, but I get nasty errors when I try and set the date.
 
var doc=database.getDocumentByUNID(taskId);
doc.replaceItemValue("status",requestScope.status);
doc.replaceItemValue("nextAction",requestScope.nextAction);
doc.replaceItemValue("startDate", requestScope.startDate);
doc.save(true)
 
I have also set the var newdate:NotesDateTime=request... but no cogar.

Any help would be greatly apprecaited
Apr 5, 2011, 4:44 PM
170 Posts
Re: accessing date value from a repeat control date picker
 have you tried
 
doc.replaceItemValue("fieldname",@TextToTime(@Text(requestScope.datefield)) 
Apr 6, 2011, 9:46 AM
261 Posts
Re: accessing date value from a repeat control date picker
Hi,
 
The problem might be the datatype of your requestScope.startDate field. The replaceItemValue method expects a NotesDateTime object for date/time fields.

If startDate contains a java.util.Date object, you can use:
 
session.createDateTime ( requestScope.startDate )

to convert the java Data to a NotesDateTimeObject
 
Mark
Apr 6, 2011, 8:53 PM
29 Posts
Re: accessing date value from a repeat control date picker
Hi Mark, too easy!! that was it. The @TimeToText did not work.. thanks

This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal