Hi All,
In my interface i have a date time field text box which will be populated with the current date time value and field will be disabled.
When I am trying to submit the page above field is not getting persisted into the DB, in DB column data type is date and time same as CDT.
Below is my interface code for that, please direct me how to correct?
a!textField( label: "Assigned Date", labelPosition: "ADJACENT", value: datetext(now(),"yyyy/MM/dd HH:mm:ss a z"), saveInto: ri!PTS_TicketTest.assignedDate, refreshAfter: "UNFOCUS",--->disabled: true, validations: {} )
Thanks
Deepak
Discussion posts and replies are publicly visible
The saveInto of a field is evaluated when the user interacts with this field. In your case this is ... never. SAIL does not work this way. Please check here or in the documentation for how to set default values.
Our most common setup to save data into a field that is not interacted with on the form is via button press - when the user submits the form, at this time you can update any data as needed via the button's saveInto parameter.
a!buttonWidget( label: "Submit", value: false, saveInto: { ri!cancel, a!save(ri!PTS_TicketTest.assignedDate,now()) } )
Thanks, great it worked