Advanced filtering: Using contents of another field and Filter Source

For advanced filtering, we reference two fields, so that when the field value changes for A, then the list for B is filtered with that value. In advanced filtering, you copy the field's Name value that you want to be the source for your filter to another field's Filter Source.

With this in mind, let's take filtering a bit further using our US States example. We want to restrict the range of values displayed in the lookup field State using a new field Region to hold the values to filter the State field.

Advanced filtering applies to the Lookup (core), Lookup Type Ahead (core), and Lookup - Multiple (core) datatypes.

To guide you through this process, we configured a new lookup group Region, and a set of lookup values for this group.

Note: You can add a Lookup Group from Dataform Field Administration (System Admin > AdvancedDataform AdminAction CenterFields) or from Lookup Groups Management (System Admin > LookupsManage Groups). See Adding Dataform Fields and Configuring lookups.

The code value of the Region lookup matches the filter values we applied to the US States lookups. We use NE, SE, N, P, SW, NW, MW, and MA.

The following procedure guides you through advanced filtering using our example of US States and Region, and the State field.

1. Add a new dataform field

Our example uses a new dataform field named Region.

To add a new dataform field:

  1. Return to the dataform. Go to System Admin > Advanced > Dataform Admin.
    The Dataform Admin dashboard opens.
  2. Open the dataform in question. Our example opens the Client Location dataform.
    The Dataform Properties form opens.
  3. In the Action Center, click Fields.
    The field list opens.
  4. Add a new lookup or multi-lookup field to the dataform and set this field to use the new lookup group (in our scenario, the new field is Region) with no filtering on the field. We set the Region field to use a Lookup Group named Region.

  1. Click Save.

2. Configure the dataform field

We return to the dataform and configure the State field to use the new Region field as its Filter Source. Make sure that the Filter Value field has been cleared. If Filter Source is used in configuring lookup field types, the Filter Value field is ignored.

  1. From the dataform field list, copy the Name value of field A. In our example, field A is Region, and the value we are copying is luRegion.

  1. Open the related field (field B, which in our example is State).
    The field configuration form opens.
  2. In Filter Source, paste the copied value.
    Our example shows that we pasted luRegion in the State field Filter Source.
  3. Note: 
  4. If you are configuring a multi-lookup field, you cannot set another multi-lookup field as the Filter Source. You can only set another standard lookup field as the Filter Source.
    You cannot use a field name that does not exist on the dataform as the Filter Source.
    If you change multi-lookup field filter settings after a user has already made a dataform selection using a value that no longer displays, their selection will be preserved. However, if they delete the selected value from the field, they will not be able to reselect it as it will no longer appear in the list of available choices. (This does not apply to the Lookup (core) and Lookup Type Ahead datatypes. For those datatypes, if the filter settings are changed, a user's selection may be cleared if the new filter settings no longer contain their selection.)

  1. Click Save.

The next step is to reload the dataform to use the new lookup settings.

To reload the dataform:

  • On the dataform, on the Action Center toolbar, click (Reload).

See it in action

Now let's see this in action. With the new configuration, the value selected in the Region field filters the list of available values in the State field of the same form. The Client Location dataform field for State now presents a new list of values – the Region values of MidAtlantic, Midwest, North, Northeast, Northwest, Pacific, Southeast, and Southwest. You might use this form of filtering when selecting a group of values (in our scenario Region is a group of states) to simplify and standardize lists.