Question

In a series of validation rules on same context, how to know whether a certain validation has set messages?
Say there are 5 validation rules in series on same context. And messages has been set on context. Can I know which validation rule\rules has set messages.
-
Like (0)
-
Accepted Solution

>irrespective of validation message if rule runs successfully will return good status.
Confirmed.
As a workaround I tried below on my local and it worked.
Below is the activity steps which run a series of validation rules and set error flag for each validation.
Error messages display on top of each section.

Is tracer tool available to use in your case?
If not, open up each validation rules one by one to see which one sets the message.

Thank you for immediate reply. But its a requirement\logic to implement, not for our knowing.

Do you mean that the end user wanted to see the validation rule name along side the error message on the screen?

No. But guidance to mentioned solution too helps us.
Our requirement.
Showing a page data under different headers using layout group. And need to display alert for corresponding area when any of its field fail validation.

There is no OOTB way to display error messages right under the header of a section.
If your validation rules are configured one for each section, I suggest you to define errorFlag property for each section and set it to true if there is any validation error, then you can use the errorFlag to control the visibility of the error message defined under a section header.

Yes that's true and in trying to do same are wandering to know the solution.
All the sections are on same page and say 1st validation has set messages and keeping @hasmessages check at end of 2nd validation is not helpful.

Try run and test the execution result of a validation rule like below.
1. use obj-validate method to call a validation rule.
2. test the method execution status in the transition block using StepStatusGood when rule.

Will get StepStatusGood as true though not setting message I,e irrespective of validation message if rule runs successfully will return good status.
Accepted Solution

>irrespective of validation message if rule runs successfully will return good status.
Confirmed.
As a workaround I tried below on my local and it worked.
Below is the activity steps which run a series of validation rules and set error flag for each validation.
Error messages display on top of each section.

Please guide us to retain field level errors message even after page-clear-messages method. We are loosing them.

You need to re-run those validation rules.
in my example, those steps from "VA" afterward re-run validation rules.

Thank you for guiding. Had to check out its acceptance as are re-running rule.