Question
Genpact
US
Last activity: 27 Oct 2015 10:22 EDT
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)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Accepted Solution
Pegasystems Inc.
JP
>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.
Pegasystems Inc.
JP
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.
Genpact
US
Thank you for immediate reply. But its a requirement\logic to implement, not for our knowing.
Pegasystems Inc.
JP
Do you mean that the end user wanted to see the validation rule name along side the error message on the screen?
Genpact
US
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.
Pegasystems Inc.
JP
Genpact
US
Pegasystems Inc.
JP
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.
Genpact
US
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.
Pegasystems Inc.
JP
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.
Genpact
US
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
Pegasystems Inc.
JP
>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.
Genpact
US
Please guide us to retain field level errors message even after page-clear-messages method. We are loosing them.
Pegasystems Inc.
JP
You need to re-run those validation rules.
in my example, those steps from "VA" afterward re-run validation rules.
Genpact
US
Thank you for guiding. Had to check out its acceptance as are re-running rule.