# Lookup tables
Lookup tables (similar to cross-reference tables) let you lookup frequently used data easily in a recipe.
Data in lookup tables are typically organized like a database table, with columns and rows of data. You can lookup an entry within the specified lookup table by matching against data in one or more columns.
Lookup table capacity
Each lookup table supports up to 10 columns of data and a maximum of 10,000 entries per lookup table.
Lookup table with the account IDs in Salesforce and Intacct, and the account names
Here are other common use cases for lookup tables:
- Given a city name, you want to get the zip code
- Given data in metric units, you want to convert to imperial units for the downstream app
- Given a department and rank, you want to retrieve vacation accrual rates
Lookup tables are enabled only for certain users. Reach out to Workato sales representatives at +1 (844) 469-6752 to find out more.
# Setting up your lookup tables
There are three ways to upload data into your lookup tables:
Try it yourself on Workato's Automation Institute. Take the tutorial and see what you can do with Lookup tables. Complete the course and become a certified Automation Pro. Find out more here (opens new window)
# Importing an existing CSV file
Select Import from CSV to create a lookup table from an existing CSV file.
Creating a new lookup table and importing a CSV file
# Adding new entries manually
You can manually enter additional lookup table entries.
Click on the Add new entry button
A new blank row will be generated for values to be entered
# Adding new entries via a recipe
There is a Lookup table connector that allows you to automate your work with lookup tables. This connector supports adding of new entries via a recipe.
# Using the lookup table connector
The Lookup table utility connector allows you to work with your tables via recipes. This connector supports the following actions:
# Add entry action
Add a new entry to an existing lookup table. You can use this action to keep your lookup tables updated, e.g. read newly created job titles from your human resources application and create a new entry for that job title in your lookup table.
Select the lookup table to write to and then input the values to provide for each cell of the row
# Lookup entry action
The lookup entry action allows you to search for an entry (a row in the lookup table) by any of its values. The lookup entry action behaves like a search and retrieves a single entry. The first matching entry depends on the values passed in. If you have duplicate entries (i.e. your lookup will return more than one entry), only one entry will be retrieved.
In the example below, we have a table called Vacation Rules with 4 columns - vacation type, department ID, job code and job title.
Using the lookup entry action in the recipe
# Search entries action
The search entries action works similarly to the lookup action. The main difference between them is that lookup action returns a single entry whereas the search entries action returns a list of entries.
Use this if you expect a list of matching entries to be returned, and wish to process the list accordingly.
Search entry action
# Update entry action
Updates an entry to an existing lookup table. This action requires the Entry ID to be mapped. You can retrieve the Entry ID from actions such as "Search Entries", "Add entry" and "Lookup Entry" action.
Update entry action
# Delete entry action
Deletes an entry in the specified lookup table by using the Entry ID.
For this example, the Entry ID is being retrieved from the Search action.
Using the delete entry action to delete Jeans data in the table Account
# Truncate table action
Instead of deleting all entries one by one in the lookup table, the truncate table action deletes all entries from the specified lookup table. Using this action cannot be undone.
In the example below, we are deleting all entries in the table Weekday
Truncate table action
Truncate lookup table
This action cannot be undone.
# Lookup table formulas
Besides using an action step to work with a lookup table, you can also use a formula to lookup entries in your lookup table. This equivalent to the lookup action and can be done inside an input field.
To use the formula, set the input field to formula mode, and enter the formula in this format:
lookup("Account IDs", "Salesforce account ID": datapill)["Intacct account ID"]
This formula will lookup the Intacct account ID of the first entry in the Account IDs table that matches any given Salesforce account ID.
# Performing lookup on in-memory table
The output of a search entries action can be used as in-memory lookup table. This is useful when a recipe invokes the
lookup function on the same lookup table 1000s of times by reducing the time taken to perform the lookup.
To use the lookup formula on an in-memory table, you need to first create a Search entries action. This action should return a list of entries that you will need for your use case. Next, set the input field to formula mode, and enter the formula in this format:
lookup(Entries, "Salesforce account ID": datapill)["Intacct account ID"]
Lookup an in-memory table
Like the example before this, the formula will lookup the Intacct account ID of the first entry in the Account IDs table that matches any given Salesforce account ID. This time, however, it will lookup entries much quicker and only from the reduced list of entries from the initial search.
Each lookup table holds up to 10 columns and 10,000 rows.
Maximum of 10 data columns available