Filter a list by another list

Prev Next

Overview

List filtering allows form users to select items from complex lists faster and easier. The process involves breaking up long lists into shorter lists in order to narrow down the user's options based on previous input. For example, say you have a long list of employees from different departments or locations. The form respondent will not want to search through all of the employees at all of the sites simultaneously. This is where list filtering will help. First, you can ask what location the user is at. Once this location has been selected, it will filter out the employees that are not associated with that given location for the second list -- allowing a quicker selection process. This article will show you how to filter using List and Lookup List fields.

List filtering using the List field

  1. Create your lists by adding the List field to your form in the Legacy Form Builder.

    • You will need two separate lists to be able to filter correctly.

    • In the example below, our first list includes three locations, and our second list consists of employees.

    List field showing three location options

    (List 1 - Locations)

    List field showing employee options

    (List 2 - Employees)

  2. Link your list items together using the Filter Key column.

    • While editing your second list, select Advanced to view the Filter Key column.

    • In the Filter Key box of each item, enter the Value of the corresponding item from your first list (you may need to look back at your first list).

    • In our example, we associate each employee (our second list) with a location (our first list). Therefore, we entered the location Value as the Filter Key for each employee.

      Filter Key column configured for list items

  3. Link your list fields together by copying the Field Key from your first list (ours is Location List) and pasting it into the Field Filter Key box of the second list (ours is Employee List).

    Field Key setting for the Location ListField Filter Key setting for the Employee ListNow, when an item from your first drop-down list is selected, it will filter the second list by only showing items associated with that selection.

    • In our example below, if we select Location 1, only employees belonging to Location 1 will appear in the second list.

      Second list filtered to show only employees at Location 1

List filtering using lookup lists

Filtering lookup lists is similar to filtering with List fields, but with a few minor variations:

  1. Create your lookup lists and add them to your form in the Legacy Form Builder.

    • We recommend having two separate lookup lists.

    • In the example, our first list includes three locations, and our second list consists of employees.Lookup list showing three location optionsLookup list showing employee options

  2. Link your two lookup lists by designating which column you'd like to filter from.

    • While editing your second list, select Advanced to select your desired column under Filter Key.

    • Use the drop-down under Filter Key to select the column from the first list

    • In our example, we want to use the column Employee Based Location from our second list (Employee List).Filter Key column selection for a lookup list

  3. Link your list fields together by copying the Field Key from your first list (ours is Location List) and pasting it into the Field Filter Key box of the second list (ours is Employee List).

    Field Key and Field Filter Key settings linking two lookup lists

Now when selecting the location from the first lookup list on the form, only the employees that belong to that particular location will be available for selection in the second lookup list.