Configure a 'Set by Filter' assignment

The Set by Filter assignment assigns the sys_id of the first record that matches a specified condition.

Before you begin

Role required: cloud_admin


  1. While configuring an assignment, specify a Value type of Set by Filter and then configure the following settings:
    Field Value
    Provisioning rule variable Specifies an array of sys_ids (for records in the specified Table) that is defined in a scripted provisioning rule assignment to apply the condition against. The condition should be designed to select one item from the list. Otherwise the first rule variable that is returned from the query is picked.

    If Provisioning rule variable is blank, then the filter runs against all records in the Table that you specify.

    See the Script assignment type.

    Table The Table is based on the "Variable to assign" field. The Table should be automatically assigned to the type of the variable in the "Variable to assign" field.
    Condition The Condition field is a standard ServiceNow condition builder against the Requested Item table (sc_req_item).
    In the following example, the networkIds array is populated by an assignment that will run before this assignment (the Order is lower for the assignment that will run earlier). networkIds is an array of sys_ids to records in the cmdb_ci_vcenter_network table. The Network variable is being assigned to the first record in networkIds that has a tag with value of non-PII. non-PII is a standard ServiceNow tag that you can apply to any record in the system.
    Set by Filter example
    Tag for Set by Filter example
  2. Save the assignment definition.

What to do next

Specify as many additional assignments as are needed.