Lookup Table Condition

When working on some Ion pages, you may find yourself in a situation where you only want to accept certain values. Respondents who enter the desired data should be sent to a different page than those who do not enter the proper data.

For example, you may only provide your services within certain zip codes. In this scenario, you could upload a lookup table to your console and use advanced rules to check to ensure the zip code entered into your Ion form is in the lookup table and in turn send the visitor to a page to review services available. Any respondent who enters a zip code that is not in the lookup table could be sent to a different page that lets the visitor know they are not in a serviceable area.

Before we get started…

You’ll want to create or upload a lookup table to your Ion console. For more information on lookup tables in ion, click here.

For example purposes, the below post was written with the attached lookup table in mind where acceptable zip codes are listed in the column A to serve as the “lookup key” and the word “serviceable” in column B to serve as the “lookup value” for each zip code. Also for example purposes, we will be calling this lookup table ServiceZips.

You will also want to have a creative in place that accepts a zip code data field. For example purposes, we will be using the ZipCode data field.

Let’s Get Started

With the ServiceZips lookup table in your console, navigate to your Ion creative. By default, you will want to set the form to go to the page that indicates that the visitor is not in a serviceable area.

Next, single-click the submit button for your form and open up your advanced rules editor. From here, you may add the below rule.

In this rule, the Lookup table data condition is used. In the first available textbox, you will want to reference the name of the lookup table then the lookup key you are looking for separated by a period (ServiceZips.33432). The condition is set equal to the word “serviceable” which is the corresponding lookup value for the 33498 key within the ServiceZips lookup table. When this condition is met, visitors are sent to the “Services” page.

Taking this a step further, you may set up your condition to dynamically look for the zip code entered into the form by replacing the lookup key (i.e. 33432) with {{ZipCode}} . This setup would take whatever the visitor has entered for their zip code and check the ServicesZip lookup table for it. If there is a zip code in your lookup table that matches the one entered in the form and its corresponding lookup value is serviceable, the respondent will be sent to the Services page.

*NOTE: When testing, you will need to use a live URL as this rule will not function as needed within a Preview. Please also note that if your lookup values are numeric, you will want to use the “Lookup table numeric data” condition.