Support Article

Local action is running on all conditions



Dropdown property(list source is a datapage) is configured with onchange event Run Activity and call Local Action feature.
Before calling local action a when condition is set that is when a property(eg prop1) has value "1", then only local action will be triggered.
This local action is triggered even if when condition is failing i.e the property is not equal to 1.
The property value is getting updated inside the activity before the when condition is checked.

Error Messages


Steps to Reproduce

1. Create a dropdown property.
2. Add a change event and add "Run Activity", "Launch Local Action" to it.
3. In Activity modify a property value and use that same property in a when condition before launching "Local Action"

Root Cause

A defect in Pegasystems’ code or rules: When condition does not take the updated property value if the property is being modified in same action .


Perform the following local-change: 

Run script which will call activity from javascript and in turn the activity will return the updated value.Based on that value perform when logic and trigger button click which has open modal dialog action configured in it.

Below is the script used to resolve the issue:-

function OpenDialog(newParam){
var setPropURL = new SafeURL("className.activity");

var callback = {
success: function(oResponse) {
strResponse = trim(oResponse.responseText);
if(srtResponse === "0"){
failure: function(oResponse) {
var request = pega.util.Connect.asyncRequest('POST', setPropURL.toURL(),callback);

Published January 31, 2016 - Updated October 8, 2020

50% found this useful

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.