Administration Guide

Building Lookup List Filters Using Filter Templates

Alloy Navigator’s default workflow offers a number of ready-to-use filter templates for many lookup lists. Before creating a new filter, make sure you do not already have a filter template that suits your needs.

For example, the “Allows filtering by Tag” filter template is available for all customizable classification lists, such as Category or Type. This filter allows you to specify a tag by which the items will be filtered.

NOTE: Filtering by tag requires that list items are tagged. For details, see Tagging List Items.

To build a lookup list filter using a filter template:

  1. Depending on whether you are building a filter for a field on an Action Form or on a Full Form, double-click the field definition in the Action Form dialog box or in the Workflow and Business Logic > [Object Class] > Fields section. The Form Field or Field Properties dialog box opens.
  2. Next to the Filter field, click the Build Expression button.
  3. In the Build Expression dialog box, click the Select Template button.

  4. The Select Filter Template dialog box displays templates available for the chosen lookup field. Review their descriptions and definitions and double-click the desired filter template to use. The Assign Filter Parameters dialog box opens.
  5. The Assign Filter Parameters dialog box diasplays filter parameters under Parameters. A parameter that does not have any assigned value will display <Double click to assign value> in red color.
  6. Double-click a parameter row to bring up the Assign Parameter dialog box.
  7. Enter a parameter value in the Value field. This value can be either static or dynamic.
    • To specify a static filtering value:

      Depending on the field type, you can select an item from the drop-down list or click the ellipsis button to access a hierarchical list of items and select an item from that list.

    • To specify a text string (for example, a tag):

      Click the Expression Builder button to bring up the Build Expression dialog box and type your text.

    • To specify a dynamic filtering value:

      Click the Expression Builder button to bring up the Build Expression dialog box and enter a SQL expression or script to be calculated at runtime.

  8. Click OK to close the Assign Parameter dialog box.

    If the filter has several parameters, repeat the steps and assign other parameter values as needed.

  9. Once you have specified values for all parameters, click OK in the Assign Filter Parameters dialog box. The text field in the Build Expression dialog box will be populated with the filtering expression.
  10. Click OK to close the Build Expression window. Alloy Navigator analyzes your input. If your filter parameters are invalid, an error message appears.

The following scenario provides an example of using filter templates in the Incident workflow.

When a technician submits an Incident via the “Create Change Request” Action, you may want to limit Change Request categories shown in the Category drop-down list to only Incident-related categories. To follow this example, you should first tag Change Request categories so that some categories have the {incident} tag, while others do not, as illustrated in Assigning Tags to List Items.

INFO: For details and instructions, see Tagging List Items.

To filter Change Request Category values by tags:

  1. In the Action Form dialog box for the “Create Change Request” Incident Action, double-click the definition of the Category field. If the Form is read-only, click Make Custom to be able to create a filter.
  2. Next to the Filter field, click the Build Expression button.
  3. In the Build Expression dialog box, click the Select Template button.
  4. In the Select Filter Template dialog box, double-click the “Allows filtering by Tag” template.
  5. In the Assign Filter Parameters dialog box, double-click a single Tag parameter row to bring up the Assign Parameter dialog box.
  6. Next to the Value field, click the Expression Builder button to bring up the Build Expression dialog box.
  7. Type incident into the text box. Since you need to specify a text value, enclose the entered text in single quotes (apostrophes), as illustrated below.

  8. Click OK to close the Build Expression dialog box, and then close all other dialog boxes to save your changes.
  9. Review the Form Field dialog box for Category field. The Filter value contains this filtering expression:

    [Tags] like ('%{'+'incident'+'}%')

    This expression ensures that the Category drop-down list on your Form will contain only Incident-related categories, as illustrated below. Click OK to save your filter.