Question
Cognizant Technology Solutions
IN
Last activity: 28 Sep 2020 8:31 EDT
Call Local action post processing on click of a button
Hi,
We have configured set of screens as a navigation and on click of each item in navigation local action is performed and screen is loaded. For every screen we have a set of validations defined in local actions. On clicking of a button in every screen these validations should be executed.
Can you please help on how can i achieve this.
Note: All the local actions are defined in the assignment.
Thanks in Advance.
***Edited by Moderator: Pallavi to update platform capability tags***
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Accepted Solution
Updated: 28 Sep 2020 8:31 EDT
Capgemini
NO
On click of button, trigger "pxPerformFlowAction" activity and pass your flow action name as param. It will trigger Validation and run post-processing.
Pegasystems Inc.
FR
Hello,
Can you share few screen shots? I'm not getting your point here. What Platform version is it?
Cognizant Technology Solutions
IN
Hi Marc,
I wanted to execute the Local action validations on click of a button. If there are any errors it should show the errors or else it should stay in the same screen.
The button is displayed on the header and it should take the local action dynamically.
Bits In Glass
GB
Hi Laxmi,
As per my understanding, you are using Screen Flow. You can use any option in the below to validate fields
1. In the FlowAction Rule form, you can use Validate rule in Validation tab so that on click of submit it validates the fields and displays an error message.
(OR)
2. In Post Data Transform you can use pxAddMessageToPage function to display the error message on the page, if the when condition is true
(OR)
3. In Post Activity you can use Page-Set-Messages/Property-Set-Messages method to display error message on the page, if the when condition is true.
-
Tom Holt
Cognizant Technology Solutions
IN
Hi Abburi,
I am not using Screen flow. In my section there is a navigation menu where i have configured on click action for each menu item to run script "pega.ui.HarnessActions.handleMenuAction" so that the section will be open in the Case Main. Now, on click of any button on this screen i want the Local action Validation to be trigerred.
Please find attachment for reference of the on click action configured on navigation menu item.
Updated: 16 Sep 2020 17:33 EDT
Pegasystems Inc.
GB
Hi Laxmi,
The best results are using option 1 from KC-Abburi above...
"1. In the FlowAction Rule form, you can use Validate rule in Validation tab so that on click of submit it validates the fields and displays an error message."
However, this only works for validating the pyWorkPage... The validation failures (errors) that are displayed in the harness come from page-level messages stored on the pyWorkPage. This causes problems if you are trying to validate a different, top-level page.
To overcome this limitation you can do something really cool... Create a reference property on the pyWorkPage that links to the top-level page you are trying to validate. You will need to do this in a Flow Action precondition Activity, using the Property-Ref method. Then just validate that reference property page as though it was a regular embedded page in pyWorkPage.
Please send a screenshots of an example validation rule you are using and I can check if that is an appropriate solution - If it is appropriate, I can help you further in making it work.
Good luck,
Tom
Cognizant Technology Solutions
IN
Hi Tom,
I wanted to execute the Local action validations on click of a button. If there are any errors it should show the errors or else it should stay in the same screen.
What will be the configuration for the button. The button is displayed on the header and it should take the local action dynamically.
Thanks in Advance
Accepted Solution
Updated: 28 Sep 2020 8:31 EDT
Capgemini
NO
On click of button, trigger "pxPerformFlowAction" activity and pass your flow action name as param. It will trigger Validation and run post-processing.
-
LaxmiPrasanna Bachu Sai kishore Kandoori Vamshi Sriram
Cognizant Technology Solutions
IN
Hi Piyush,
This one worked. Thank you so much.
Just worried about its usage as it is mentioned as "Runs validation and post-processing on a non-work object form submission."