Basic field filtering: Using the lookup Filter and dataform field Filter Value

ClientSpace provides lookup field filtering, which allows you to reduce the number of value choices selected from a dataform field. This is accomplished using the Filter field on the Lookup Details form. You can use the Filter field to filter the dataform field using either a straightforward basic filter or a controlling field using advanced filtering. We discuss advanced filtering in the next topic.

For basic field filtering, let's continue to use the US States as an example. The Lookup Group, named US States, is already established. The lookup values are also established: the states from Alaska to Wyoming (in alpha order). In the preceding topic, we configured the Client Location dataform to use the lookup group US States for the field State. Because no filter value is applied, the field displays all the lookup values in the group US States, as shown in the adjacent image.

So then, how can you apply further filtering to limit the list? Let's first look at basic field filtering.

Now let's step through the procedure for configuring basic field filtering using the Filter value in the lookup details. For our example, we use Florida and assign a value to indicate a geographic region.

 

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

 

1. Assign a Filter value to the lookup detail

To assign a Filter value:

  1. Go to System Admin > Lookups.
    The Lookups dashboard opens.
  2. Filter the list to search for your lookup group.
    Our example uses US States as the search filter.

  1. Open a state.
    The Lookup Details form opens. Our example uses Florida. Let's assign a Filter value to indicate a geographical region.
  2. In Filter, enter a value.
    We assigned a value SE to represent the Southeast geographic region.

  1. Click Save.
  2. Repeat this process for each of your lookups. For this example, US States, we need to assign an appropriate Filter value to each state (such as, SE, NE, or MW). For your lookup group and values, apply the same approach.

2. Configure the dataform field to use Filter Value

Now with a Filter value assigned to our states, let's see it in action. Note, we have already set the Filter value for all of the Southeastern states. The lookup values (states) have a filter value (such as SE for Florida, Georgia, North Carolina, and South Carolina). However, to use the filter value to limit what is displayed in a dataform field, we must perform additional field configuration. Let's continue the example using Southeastern states. We want to narrow the dataform field to only list states with a filter value of SE so that only Southeastern states appear in the list.

To configure the dataform field using Filter Value:

  1. Return to the field configuration. Go to System Admin > Advanced > Dataform Admin > Fields.
  2. Open the field in question, and in Filter Value, enter a value.
    Our example shows the State field with SE in Filter Value.

  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 that we have hard-coded a value in Filter Value for the State field let's see how this looks on the dataform. We only want the Southeastern states to display in the list. So, we assigned a Filter for each state lookup and then set a Filter Value on the dataform field. The State selections are now just the Southeastern states. **

** It is essential to understand that filtered lookup fields display only the lookup values with filters that match the Filter Value on the dataform field configuration and any lookup values in the lookup group that do not have a filter set. For example, states that are not assigned a Filter, such as SE or NE, will, by default, appear in the list of available values. States that display in the list and are not in the Southeast indicate that you need to assign a value to Filter in the lookup details. In other words, assign a Filter value for all the lookups that belong to a Lookup Group – if you do not want irrelevant items in the lookup field list.