Posted: 29 Dec 2017 3:31 EST Last activity: 30 Dec 2017 9:41 EST
When Condition For Action Set under Action event for Button control in 7.1.8
I need to control the onclick action events configured for a button in the section which i cannot do it in pega 7.1.8 version as there is no when condition option available, which is availabel in 7.3 version.
Please take a look at the screen shot, I am trying to do Open assignment which i need to control if there any issue or error from the activity that is fetching the assignment key.
Anyone had such scenario, please let me now the solution.
I have reviewed screen-shot and verified in both versions. In the later version(i.e. 7.3), a "When" condition feature was added for most of the actions. We can't back-port for Pega 7.1.8 as it isn't the bug, though the latest product features.
Alternatively, you implement it with the custom tweak.
Configure two buttons with visibility configured with "When" condition as per your business requirement. Make sure, only one button appears in UI either one satisfying "When" condition, and add "Open Assignment" as an action item for this button. While for another button with no "Open Assignment" action and do the default action.
Also, you can create a custom control for the same with "When" a condition for "Open Assignment" action.
Hope it gives you the idea to implement your use-case. Kindly notify, if it answers your query and mark this post answered.
I had the exact same ideas for this requirement. I thought of avoid writing the custom code considering our screen performance. We have this button in each row of a repeat grid, Putting multiple button with visible when conditions doesn't work as My requirement is to check something dynamically at any time when user is trying to click on Perform button which doesn't work with 2 buttons in place, I have attached screen shot for your reference.
Onlick of Perform I have to check if there is any item present in Queue(which can be present in the queue at any time user working on the case) and instead of Open Assignment I have to show user a message like "Update waiting in queue, Update info first" and restrict Open assignment not open the assignment.
Let me know of any other solution you would think of
Posted: 4 years ago
Posted: 30 Dec 2017 9:41 EST
Midhun Krishnankutty (MidhunKrish)
Principal Solutions Architect
Probably you can try both of these actions in the same activity, Try making use of Assign-.ProcessAssignment activity in a step with a when condition
Second option would be to write a custom control that sets a flag using the same activity which you use in the first action and check this flag to determine if you need to open the assignment.
Also for your information, Pega 7.2.2 itself has when conditions on most UI actions. So if there is a possibility for an upgrade to 7.2.2,you can easily do this (but i understand that it doesn't makes sense to upgrade for just one requirement;hence if you have more of such requirements 7.2.2 would be worth a try)