Support Article
Page-Clear-Messages method does not clear Date validation errors
SA-8875
Summary
There is a date field on the screen. On entering an incorrect value, a validation error is displayed on screen. However, when we try to clear the message using "Page-Clear-Messages" in the activity step, the validation error message is not cleared.
Error Messages
Not Applicable
Steps to Reproduce
- Create a section with a date field.
- Have another button which refreshes the section and calls an activity Page-Clear-Messages in one of the step.
- Run the flow and enter a wrong value in the date field to get a validation error.
- Click on the button to call the activity.
Root Cause
This behaviour is as per design.
Resolution
Page-Clear-Messages will delete all messages placed by the Page-Set-Messages method on the step page. Messages placed by constraints rules, edit validate rules, and property type validation are not cleared; they are cleared and the restrictions are detested only when the property value changes. This also prevents wrong data from being submitted when there are errors.
You can refer to this PDN document - About Page-Clear-Messages
Published October 8, 2020
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.