Skip to main content


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

Defining conditions in the condition builder

Updated on November 10, 2022
Applicable to Hybrid mode applications

Use the condition builder to create conditions that define the behavior of your application, or to use for propositions evaluated by a proposition filter. You can save custom conditions to the condition library for future use.

Before you begin:
  • If you want to use a configuration as a value to compare at run time to specify application behavior, create a configuration. For more information, see Creating configurations.
  • If you want to evaluate an answer to a question at run time, create the question. For more information, see Adding a question to a question page.
  • If you want to use a prediction to evaluate at run time, create and configure the prediction for case management. For more information, see Predicting case outcomes.
  • If you want to reuse a When condition as a value to compare at run time, mark the When condition as a relevant record. For more information, see Marking a record as relevant.
  1. In App Studio, navigate to a condition builder that defines the application element that you want to edit.For example: The condition builder for refreshing a layout is on the configuration pane of that layout. For more information, see Defining refresh conditions for UI areas.
  2. Optional: For proposition filters, to remove all previously added criteria from the condition builder, click ActionsClear all criteria.
  3. In the Configure condition section, in the list of values, select a value to evaluate:
    • To select a configuration that defines application behavior at run time, click Configurations, and then select the configuration from a configuration set.
    • To select a field from a data model in your application, click Fields, and then select the field.
    • To select a question to evaluate the answer at run time, click Questions, and then select the question.
    • To select a prediction, click Predictions, and then select the prediction.

      If the prediction has a binary outcome, for example, the probability of a fraudulent claim, the following fields are available:

      • Probability (value between 0 and 1, for example, 0.01)
      • Segment (cutoff probability labels, if defined in the prediction, for example, Abnormal and Normal)

      If the prediction has a continuous outcome, for example, future credit card transactions, the Value field is available and contains the predicted value.

    • To select a when condition from your application, click When conditions, and then select the condition.

      Tip: To view the logic of the When condition that you want to use, click Preview this condition, as in the following figure:

      Previewing a condition
      Condition builder with an open preview of a When condition that works as a value to compare at run time

  4. In the comparator list, select a comparator.
  5. In the value field, enter or select a value that your application compares with the field in the data model or a when condition.For example: Status work is equal to Done
  6. Optional: To add more conditions, click the Add a row icon, and then repeat steps 3 through 5.
  7. If you add multiple conditions, between the rows, select the and or or operator to define how to evaluate the conditions.
    You can group conditions using the and or or operators.
    Result: If you select and, the condition evaluates to true when all of the rows evaluate to true. If you select or, the condition evaluates to true if at least one of the rows evaluates to true.
  8. In the list in the upper-right of the page, select one of the following options to specify how to evaluate condition groupings:
    • To evaluate the conditions that are linked with the AND operator as a group, and to evaluate the conditions that are linked with the OR operator individually, click Group ANDs.

      With this grouping, the grouping of condition 1 AND condition 2 OR condition 3 OR condition 4 is evaluated as (1 AND 2) OR 3 OR 4. That is, either conditions 1 and 2 must both be true, or either one of conditions 3 and 4 must be true.

    • Group ORs - Select this option if you want conditions linked with the OR operator to be evaluated as a group, and conditions linked with the AND operator to be evaluated individually.

      With this grouping, the grouping of condition 1 AND condition 2 OR condition 3 OR condition 4 is evaluated as 1 AND (2 OR 3 OR 4). That is, both condition 1 and one of conditions 2, 3, and 4 must be true.

    • To define a grouping by both the AND and OR operators, click Use advanced logic, and then specify the condition grouping in the Logic string field.Note: If you change a condition that uses advanced logic for the Group ANDs or Group ORs, all the groupings that you previously defined are reset.
    Tip: Conditions that are evaluated as a group are displayed on a single block of gray background, so that you can identify them more easily.
  9. Optional: To reuse the condition in the future, save the condition to the library:
    • For conditions in a workflow, click MoreAdd to when condition library.
    • For conditions in a proposition filter, click ActionsSave to library.Note: The Save to library option is not available if the conditions include either Strategy rules or when conditions with parameters. The option is also disabled for proposition filters which include default criteria that are created using the Use advanced logic option.
    Result: The conditions are saved to a new when rule in the top level class of the proposition filter. The system automatically registers the when rule as a relevant record for use in the condition builder.

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