Thank you for your feedback.
Form temporarily unavailable. Please try again or contact to submit your comments.
  • Madrid
  • London
  • Kingston
  • Jakarta
  • Istanbul
  • Helsinki
  • Geneva
  • Store

Configure a Set by Filter assignment

Log in to subscribe to topics and get notified when content changes.

Configure a Set by Filter assignment

This assignment assigns the sys_id of the first record that matches a specified condition.

Before you begin

Role required: cloud_admin

About this task


  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.
    Figure 1. Set by Filter example
  2. Save the assignment definition.