Skip to main content


         This documentation site is for previous versions. Visit our new documentation site for current releases.      
 

Configuring advanced options of a When rule

Updated on May 31, 2022

Define complex logic strings and use functions in conditions by configuring advanced options of a When rule.

For example, if you create conditions 1, 2, 3, and 4, you can define an advanced logic string for the conditions, such as 1 AND (2 OR (3 AND 4)).

Note: As a best practice, use the Conditions tab to configure and update the rule. Your configuration populates the conditions array and the Logic String field on this tab. If you add, change, or delete rows, or edit the Logic String field, you can no longer use the Conditions tab. Updating values in conditions or using the Options area does not disable that tab.
  1. In the navigation pane of Dev Studio, click RecordsDecisionWhen, and then open a rule that you want to edit.
  2. On the rule form, click the Advanced tab.
  3. In the drop-down list, select an expression type.
  4. Enter a label for the expression, for example, A.
  5. Complete an expression.
  6. If you want to add more expressions, click Add condition, and then repeat steps 3 trough 5.
  7. In the Logic string field, enter the Boolean logic operations performed on the Conditions array to evaluate if the condition is true or false at run time.
    If you created the conditions on the Conditions tab, the system populates this field by using the AND and OR operators, in addition to the group hierarchies that are defined on the condition tree.

    You can use and, or, and not in the statement. Use parentheses to control the order of evaluation.

    For example: (A and B) or (C and not D)
    Result: When you save the rule, if the form contains only one test row, the system inserts the label for that test row in the Logic string field. If you have more than one row, the system requires all rows to be true. If you want a different outcome, revise and save the statement again.
  8. Optional: In the Advanced options section, in the Allowed functions field, select a function alias that restricts the available conditions to the one in this field by clicking Add function.
    If you add multiple functions, the top entry is the default one.
  9. Click Save as.

Have a question? Get answers now.

Visit the Support 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.com is not optimized for Internet Explorer. For the optimal experience, please use:

Close Deprecation Notice
Contact us