Question
Verramobility
US
Last activity: 7 Feb 2017 12:11 EST
How to display a Local action in modal dialog depends on a condition.
How to display a Local action in modal dialog depends on a condition.
First event is Run Activity to run some logic and getting one property(.CheckModal) value.
Second event is Local Action in modal dialog.(e.g.: When CheckModal="Yes")
Third event is Finish Assignment.
Note: Depends on the property value in first event, modal dialog in event 2 should occur. If the Event1 sets CheckModal property value to "No" then instead of Modal dialog(Second event), Finish Assignment(third event) should happen.
Using pega PRPC version is 7.1.8.
***ModEdit: Included Topic| Vidyaranjan***
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Accepted Solution
Pegasystems Inc.
US
Per private message from author "This requirement has been taken care by using the java script function."
Thank you,
Marissa | Community Moderator | Pegasystems Inc.
Pegasystems Inc.
GB
Hi Raviteja,
1) Include .CheckModal as hidden property in the section.
2) Write a JS function which will get the value of this hidden proeprty and if local action is not required call
pega.control.actionSequencer.clearQueue();
This will clear next action in the queue and Local action will not be called.
Call this Function in Run script action . In clude this Run script action in between Calling Activity and Launching Local Action in modal dialog
-
Srikanth Yangali
Cognizant Technolgy Solutions
IN
We had a similar situation where we had to conditionally close pop-ups. I hope "pega.control.actionSequencer.clearQueue();" script would work equally well in this case.
Pegasystems Inc.
IN
Hello
Another way could be to perform finish assignment in your acitivity itself so that when the CheckModal is false, finish assignment gets called from the activity itself.
Blue Rose Technologies GmbH
DE
How about having two buttons one with finish assignment and other with launch -> local action and toggling these buttons based on a client side visible when condition. This approach would be cleaner compared to having multiple non related actions as part of a single action set.
Cognizant Technology Solutions
CA
can we do like that in 7.1.7?
Pegasystems Inc.
US
Searching for "conditional local action" on the PDN will return numerous results about this topic. There are OOB ways to do this (with a condition on the action on the control) - but they can have limitations. There are also posts with suggestions for custom local changes.
SA with OOB configuration (and limitation):
https://community.pega.com/support/support-articles/conditional-local-action-comparison-doesnt-update
SA with example script for local change:
https://community.pega.com/support/support-articles/local-action-running-all-conditions
Accepted Solution
Pegasystems Inc.
US
Per private message from author "This requirement has been taken care by using the java script function."
Thank you,
Marissa | Community Moderator | Pegasystems Inc.