Policy logic condition fields

  • Release version: Zurich
  • Updated July 31, 2025
  • 2 minutes to read
  • Summarize
    Summarized using AI
    This content was generated using new OpenAI-powered functionality. Results are provided on an as is basis and are not guaranteed to be accurate or complete.

    Summary of Policy logic condition fields

    Policy logic in ServiceNow Zurich release enables you to define conditions that determine whether a policy is compliant or non-compliant. Using a condition builder, you can create complex logical conditions by combining multiple rules, condition sets, and nested policies to evaluate compliance effectively.

    Show full answer Show less

    Condition Builder and Logic Structure

    The condition builder allows you to add multiple rules using and / or operators and remove conditions as needed. You can create new condition sets for organizing different logic branches. The logic supports if, else if, and else statements to specify alternate conditions based on prior evaluations. Dependent conditions can be linked with and / or operators to form complex expressions.

    Key Fields for If and Else If Statements

    • Condition description: Explains the purpose of the condition.
    • Source: The variable or data source the condition evaluates.
    • Operator: Comparison operators that dynamically update based on the selected source.
    • Value: Enter or build values using the Data picker to concatenate multiple text strings or select variables.

    Note: If the source is a choice field, the Data pill picker is disabled.

    Then and Else Statement Fields

    • Logic type: Choose between Decision (policy evaluates compliance) or Run policy (for nested policies returning child policy decisions). Nested policies support up to two levels (child and grandchild).
    • Log level: Defines the severity or importance of the log entry.
    • Log message: Text or concatenated strings using the Data picker for dynamic logging.
    • Output type: Specify one or more output types related to the log.
    • Data: Enter or build data values via the Data picker for use in logs or outputs.

    Data Sources and Calculated Fields

    You can access various data sources through the Data source tab to use their variables within conditions and logs. Numeric fields support calculation using operators such as addition, subtraction, multiplication, division, and parentheses to control operation order. Expressions are enclosed in calc[] to evaluate complex calculations.

    • Plus (+): Adds variables/constants.
    • Minus (-): Subtracts variables/constants.
    • Multiplication (): Multiplies variables/constants.
    • Division (/): Divides variables/constants.
    • Parentheses (): Groups operations to enforce precedence.

    Example: Var1 + Var2 Var3 / Var4 demonstrates mixing operators within a calculation.

    Policy logic is a set of conditions that is used for determining whether a policy is compliant or non-compliant. You can use the condition builder to specify conditions for the policy.

    Policy logic page

    Policy builder.

    Select the or and and button to add multiple rules in the condition set. Select the minus icon Minus icon. to delete a condition.

    You can add a condition set by selecting the New condition set button.

    Table 1. If and else if statement fields
    Field Description
    Condition description Description of the field.
    Source Variable of the source for the condition.
    Operator List of operators to filter the source for the condition. The list changes depending on the source selected.
    Value Value to enter text. Select the Data picker icon Data pill picker icon. to concatenate multiple text strings with multiple data pills to select a variable for the log.
    Note:
    If your Source is choice, the Data pill picker icon is inactive.

    The else if statement enables you to specify a new condition if the first condition is false. The else statement enables you to specify a new condition if it does not apply to the if statement.

    You can add a dependent condition by selecting or or and next to the condition.

    Table 2. Then and else statement fields
    Field Description
    Logic type Select the logic type of the policy:
    • Decision: Determines if the policy is Compliant or Non-compliant.
    • Run policy: For nested policies, the parent policy will return the decision of the child policy that has been selected in the builder.
      Note:
      PaCE supports nesting policies for decision-making and up to two levels are supported, a child and a grandchild.
    Log level Level of the log.
    Log message Log message field to enter text or select the Data picker icon Data pill picker icon. to concatenate multiple text strings with multiple data pills to select a variable for the log.
    Output type Output type of the log. You can select the plus icon Add icon. to add multiple output types or the minus icon Minus icon. to delete the output type.
    Data Data field to enter text. Select the Data picker icon Data pill picker icon. to concatenate multiple text strings with multiple data pills to select a variable for the log.

    The following images show you are able to use the data pill picker to concatenate data in the fields:


    Selecting data from pill picker.


    Data concatenated.

    You can see a list of the data sources under the Data source tab.Data source tab.

    You can calculate fields using numeric operators and use these variables to calculate the desired value in a policy logic.
    Note:
    This only supports numeric fields.
    Table 3. Calculated fields
    Operator Description
    Plus (+) Add variables and constants. For example, "Var1 + Var2..."
    Minus (-) Subtract variables and constants. For example, "Var1 - Var2..."
    Multiplication (*) Multiple variables and constants. For example, "Var1 * Var2..."
    Division (/) Divide variables and constants. For example, "Var1 / Var2..."
    Parentheses () Use parentheses to support the order of operators.
    calc[] Use the brackets to evaluate an expression.

    You can mix and match between the operators. For example, "Var1 +Var2*Var3 / Var4".