We have a form on a db which has worked upto now. Now that we have upgraded all clients to 6.5 the form is throwing up validation errors.
Basically in the middle of the form we have a timetange field (Date/time field with allow multiple values/ show time). The default value was set as:
@TextToTime(@Text(StartDateTime) + " " + @Text(EndDateTime))
When a new form was composed the field just showed a control with a dash (-) and users did not have to fill that field in (it stayed as a dash) and form could be saved even though there was validation carried out [automatically refresh fields].
Now that we have upgraded the clients the form keeps throwing up validation errors whenever you move off any field. The errors report that the timerange field is not valid (because it is basically blank with only a dash as set by default).
How can we stop this as we want to keep this field as it was (non-mandatory) and avoid the continous validation?
Subject: Please help!!
The field is a NotesDateRange class. Problem is that when you compose a new form this field is not set. I want to give it default values but cant seem to find a way to set the initial values (for StartDateTime and EndDateTime components of this field).
Subject: Please help!!
It looks to me that you want to populate that field with the two date-time values. There’s no need to change them to text and then back to numbers.
Try this instead ( : is the multi-value separator, and Trim will remove any blank values)
@Trim(StartDateTime:EndDateTime)
Subject: RE: Please help!!
Grham, thanks for that. The problem is that the field is blank when you compose a new doc therefeore the refresh fields is throwing up the errors.
Idealy I would like to set the field to a some value. I have place the formula that you suggested in the field’s Default value as a Formula. However, the field is still blank when the form is composed and error is thrown up.