Defining Filtered Fields

The Filtered Fields tab allows you to dynamically filter the options available in a lookup attribute field based on another field. For instance, you can limit the cities available in a drop-down based on a previously selected country. Thus, you can ensure data accuracy and streamline the user experience when the lookup entities you are referencing are also referencing each other.

Set up a Filtered Field in a Data Form, Form Driven Flow, or App Data Form

For instance, you may need to create a user registration form to collect each of your users' name, country, and city. The available cities and countries are stored in separate entities, and the city entity has a lookup to the country entity to reference which country the city belongs to. To create your registration form:

  1. Create an entity that stores all country names (for details, see Business Entities). The name of this entity is countries.
  2. Create an entity that stores all city names. The name of the entity is cities. This entity should also include a lookup attribute called country which references the countries entity (for details, see Attributes).
  3. Create your registration form source entity that includes an attribute for the user name and two lookup attributes called city and country, referencing the cities and countries entities respectively.
    At this point, you should have the following entities:
    EntityAttributeTypeDescription
    countriesnametextName of the country
    citiesnametextName of the city
    countrylookupReference to the countries entity
    regFormnametextName of the user
    citylookupReferences the cities entity
    countrylookupReferences the countries entity.
  4. When creating Data Forms, Form Driven Flows, or Servicing (App Data Forms), use the Filtered Fields tab to insert a filter for the city attribute based on its country.

    The filtered field should have the following settings:
    1. Attribute To Filter - city, since we are filtering the values that will be visible in the city lookup attribute of the registration form entity.
    2. Attribute To Filter Reference - country, since the lookup attribute in the cities entity used to reference the countries entity is called country.
    3. Attribute To Filter By - country, since we are filtering cities based on the value selected in the country attribute of the registration form entity.

Based on the records you have populated in the countries and cities entities, the city attribute field will be filtered based on the country.

Filtered Fields on Editable Views

The filtered fields also apply on editable views. If you set up inline editing for a view, the filtered fields settings that you find on the data form will also apply on the view.

In the Attribute To Filter Reference field, you can also specify the alias when you use a custom view for the lookup that will be filtered and this field is not on the main entity (the entity of the lookup).

When using a custom view for the lookup field that will be filtered and this field is not on the main entity (the entity of the lookup), in the Attribute To Filter Reference field, you can also provide the alias.

In the example above, Attribute to filter reference is "f2.Field3Id" and "f2" is the alias from the entity Field3 which is related to Field1 which is the entity from the lookup.