Hello,
We are facing a problem if just after selecting a date we press the OK button of the page without previously losing the focus from the date field. In this case, the OnValidate trigger of the date field never fires, and we lose the selected date, using the old one in the action triggered by the OK button.
Is there any way to validate the field value just after selecting the date and without losing the focus?
Please note that, "Due date" field is part of a ListPart included into a WorkSheet page.
Thanks in advance for any suggestions.
--
Belén
Hello Zaahed. I'm afraid we haven't found a work around for this yet. Also I just checked it in a 18.3 BC version and the issue is still happening.
I hope you find a way to solve it and you can share it with us.
Hi Belen, I seem to have come across the same issue. When a date is selected from a Date field on the page and the immediate next action is a drill down on another field, the new value from the date-picker is not yet validated into the date field The Date field still has an old value. Have you managed to find a workaround for this? or do you still experience the issue
The thing is that when pressing OK, OnQueryClosePage trigger fires to execute the OK action and no validation has happened in the date field. The logic in OK needs the new valuie of the date field but on the contrary, since it has not been validated, it processes the old value. Then page closes.
The field will be validated on clicking OK button if you have not pressed the tab button.
Yes, the solution is to lose the focus (pressing tab or clicking anywhere else outside the field) before clicking OK button. However, we can not assume that users will do that before clicking OK.
We were thinking about a workaround to solve it since with text fields is not happening the same as with the date field. If after writing in a text field, we press OK without previously changing the field focus, the text is not lost. Could it be anything related to date fields not validating the value after date is chosen in the date picker?
Yes. this is the reason you lose the data after clicking on OK button.
And once you select the Due Date, press tab button which will trigger the OnValidate trigger.
Thanks for the idea. However, DelayedInsert is not set.
We are working with temporary records in the listpart, by setting SourceTableTemporary = true. Could the issue be related to this?
Hi,
Check if the DelayedInsert is set on the Page.
Regards
Avinash B
Sohail Ahmed
1,063
YUN ZHU
1,002
Super User 2025 Season 1
Mansi Soni
810