Dynamic filter options enhance filtering by allowing users to run existing script includes or JavaScript against a reference field within condition builders and dynamic reference qualifiers.

Before you begin

Role required: admin

About this task

This task describes how to create a new dynamic filter option and an associated script include.

Dynamic filter options "objectize" script includes/JavaScript, enabling them to be reused in multiple condition builders and dynamic Reference qualifiers. This type of filter enables you to modify a script once and have the changes automatically take effect everywhere the dynamic filter option is used.

When defining a dynamic filter, you can:
  • use an existing is (dynamic) dynamic filter option (condition builder only)
  • use an existing dynamic filter option (OOB or custom)
  • create a new dynamic filter option and script include/JavaScript
All condition builder dynamic filters use the is (dynamic) operator and call a dynamic filter option. In the following example, the pre-existing dynamic filter option Me is being used. For a list of available pre-existing condition builder dynamic filter options, see Dynamic operators.
Note: Dynamic filters are supported in scoped applications, but they are not supported in UI policy conditions.
Figure 1. Dynamic operands
Dynamic operands

Procedure

  1. Create a scripted filter as a client-callable script include or business rule.
  2. Navigate to System Definition > Dynamic Filter Options.
  3. Select New.
  4. Complete the form.
    Note: Dynamic filters using Table API GET methods in scripts only work when using the same user configured in the basic authentication profile. To allow multiple users access to the dynamic filters, use global JavaScript APIs such as GlideRecord and GlideQuery APIs instead.
  5. Select Submit.