Filter a List Based on User

Prev Next

You can show each user only the list choices that apply to them. This article covers how to filter a list by the user who's signed in to the FastField mobile app.

How user filtering works

Each choice in the list gets a Filter Key with a user's email address. The list's Field Filter Key is set to CURRENT_USER_VAR, which stands for the signed-in user. When a user opens the form, the list shows only the choices with their email address.

For example, an inspection form lists the sites to inspect. Josh, Adam, and Nick use the same form. With user filtering, each inspector sees only the sites assigned to them.

You can filter List, Global List, Lookup List, and DataTable List fields this way. Option List fields don't have a Field Filter Key.

Add a list

  1. In the Form Builder, select Add Fields in the side bar.

  2. Under Lists, select List.

The Add Fields tab with List selected under Lists

  1. In Field Label, enter the question, for example Site.

Add each user's email as a filter key

  1. Under List Options, select Advanced Options.

  2. For each choice, enter the Name, for example Sheds.

  3. In Filter Key, enter the email address the user signs in with, for example josh@example.com.

  4. Select Add after each choice, then select Close.

Advanced List Options with a user's email address as the Filter Key for each site

Note

A Filter Key holds 1 email address. To show the same site to 2 users, add the site once for each user.

Filter the list by the signed-in user

  1. In the list's field settings, enter CURRENT_USER_VAR in Field Filter Key.

Field Settings for the Site list with CURRENT_USER_VAR entered as the Field Filter Key

  1. Select Save Draft, then select Publish when you're ready for users to see the change.

When Josh opens the form, the Site list shows only Sheds and Parking Lot.

Note

The form preview in the Form Builder doesn't know who's signed in, so the list stays empty there. Test user filtering in the FastField mobile app.

Tip

For a Global List, Lookup List, or DataTable List, put the email addresses in the list's filter key column. Learn more about filtering a list by another list.

Note

The Assistant can't set filter keys. Set them in Field Settings.

What's next