Skip to main content

This content has been archived and is no longer being updated. Links may not function; however, this content may be relevant to outdated versions of the product.

Support Article

Conditional calling Local action on click of Submit button



On invoking a Local action conditionally on click of the Submit button, the user must click the button twice to validate the When condition.

Error Messages

Not Applicable

Steps to Reproduce

  1. Create a section with dropdowns and an AutoCorrect conrtol.
  2. Create a button with an Action set to open a modal dialog based on a When rule. The When rule is based on the dropdowns and AutoCorrect values.
  3. Click the button twice to use the When rule such that the popup displays. However, the When rule is true both times.

Root Cause

The Action markup for the control is generated based on the When Rule's evaluation on a Section Refresh or First load. The When Rule is updated after the Action markup is generated.


  1. Add a Refresh action on the Autocomplete property error code using the When condition as a ‘rule’ in the Local action of the Submit button.

  2. Use the When as ‘other property’ instead of When rule and add all the conditions. If Step 2 is not feasible, create a boolean property (for example, Test) and create a Declare Expression on it.

    a. Add all the conditions in the Expression builder of the Declare Expression.

    b. Create a When rule and add the  boolean property 'Test' in the When rule.

  3. Use this When rule in the Local action for the Submit button. Despite using this change, a Refresh action must be add on the Autocomplete property error code after the Post Value.

Published July 17, 2020 - Updated December 2, 2021

Was this useful?

0% found this useful

Have a question? Get answers now.

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

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega Community has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice
Contact us