Knowledge Base

How to show an empty field when no items match the filter criteria in lookup field?

When you filter items in a Cascaded Lookup column, if there are no items match the filter criteria, by default, all lookup items will be shown in the lookup column. But you can specify to show empty value to avoid confusing end users in this case.

This article will demonstrate how it’s done in Cascaded Lookup.

WHAT YOU'LL GET

Because there are no items matched with the filter criteria, an empty field is shown.

WHAT YOU'LL NEED

The sample data we use for this case

Then, create another list named as Orders from the custom list template with following columns and items on the same site collection.

Show an empty field when no items match the filter criteria in lookup field

  1. Download the trial version of Cascaded Lookup, and install it to your SharePoint server.

  2. Navigate to the Orders list prepared above, click List tab. In the Manage Views group, click Create Column .

    Or go to the List Settings page and click the Create column link in Columns section.

  3. In the Name and Type section, enter a name in the Column Name field to give it a meaningful name such as Customer, then select Cascaded Lookup as the type of information in this column.

  4. In the Additional Column Settings section, keep all settings as default.

  5. In the General Settings section, configure settings as following.

    In the Get information from this site box, select Marketing Center, because in our example the Customer list is located in a SharePoint site named as Marketing Center. You need to select the corresponding SharePoint site in which your Customer list is located.

    In the From this list box, select Customer.

    In the In this column box, select Customer.

  6. In Filter section, select Allow users to filter items using columns option, and select Country and Industry columns.

  7. In Miscellaneous section, select Show an empty field when no items match the filter criteria option.

  8. Keep other settings as default and click OK.

  9. And then, you will find that a Cascaded Lookup column named as Customer has been added to Orders list as following.

  10. In the Orders list, select order CA-0001 and click Edit Item.

    In the Edit Item form, in Customer column, select German in Filter by Country and select Finance in Filter by Industry. And then “None” is shown as following, this is because there is no item match the above filter criteria.

    But if you unselect Show an empty field when no items match the filter criteria option in step 7, lookup items will still be shown although they do not match the filter criteria.

Login