> ## Documentation Index
> Fetch the complete documentation index at: https://docs.runway.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Lookups

> Lookups—also known as mapping tables—work similarly to Excel’s VLOOKUP, allowing you to assign or insert a dimension in one database based on how it corresponds to a dimension in another.

In Runway, there are two ways to build a mapping table:

* **Data-source powered lookup (Recommended)** – Best suited when the dimensions you’re referencing already come in via a data integration. This ensures new dimensions automatically flow through to your lookup.
* **Fully user-created lookup** – Useful only when the referenced dimension doesn’t exist in your data sources and must be manually created in Runway.

## Data source-powered lookup (Recommended)

1. Create a new database where the lookups will be set.

   <img src="https://mintcdn.com/runway-5055a12e/QgAyEmvdZUWT1iiY/images/lookups/lookup-create-db.png?fit=max&auto=format&n=QgAyEmvdZUWT1iiY&q=85&s=59bfdc5c846eff24d06b51a77e835e16" alt="Lookup Create Db Pn" width="1638" height="770" data-path="images/lookups/lookup-create-db.png" />
2. Open the **database configuration menu** and choose the appropriate **Data source** and **Segment** to drive your mapping. This is usually the most granular database that holds the values you want to map. In this example, we’re mapping GL Accounts to a Parent Category and will use the most granular database (driven by the accounting system) that contains all all GL Accounts.

   <img src="https://mintcdn.com/runway-5055a12e/QgAyEmvdZUWT1iiY/images/lookups/lookup-db-config.png?fit=max&auto=format&n=QgAyEmvdZUWT1iiY&q=85&s=1fa24323b48ccea5366736a508374198" alt="Lookup Db Config Pn" width="1846" height="912" data-path="images/lookups/lookup-db-config.png" />
3. After confirming your selection, the chosen **segment** (e.g. GL Account) will populate as column in the database. Click the **+** icon in the database header, select **Dimension**, and choose an existing dimension or create a new one. This is your **lookup value**—what you'll use in other databases based on the segment that you set in Step 2.

   <img src="https://mintcdn.com/runway-5055a12e/QgAyEmvdZUWT1iiY/images/lookups/lookup-create-dimension.png?fit=max&auto=format&n=QgAyEmvdZUWT1iiY&q=85&s=318681b8e5a42ad5b2f94664af676f46" alt="Lookup Create Dimension Pn" width="748" height="810" data-path="images/lookups/lookup-create-dimension.png" />
4. Once the new column appears, **double-click into any cell** to assign the attribute you want the segment to map to. Repeat this for each row—**you must assign a attribute for every row.**

   <img src="https://mintcdn.com/runway-5055a12e/QgAyEmvdZUWT1iiY/images/lookups/lookup-fill-cell-1.png?fit=max&auto=format&n=QgAyEmvdZUWT1iiY&q=85&s=f9841c5b13aa22f297657eb62dca1ad1" alt="Lookup Fill Cell 1 Pn" width="1116" height="716" data-path="images/lookups/lookup-fill-cell-1.png" />
5. As your business grows and changes, this lookup table is where your mapping will be maintained. For example, if new GL Accounts are added, they will automatically flow into this lookup table due to the database configuration. **You must manually set any new mappings for new line items.**

## Fully user-created Lookup

1. Create a new database where the lookups will be set.
2. Click on the + in the database header, select Dimension, and select an existing dimension or create a new one. **This is the value that will be used to look up the additional dimensions that you set.**
   <img src="https://mintcdn.com/runway-5055a12e/QgAyEmvdZUWT1iiY/images/lookups/lookup-serach-dimension.png?fit=max&auto=format&n=QgAyEmvdZUWT1iiY&q=85&s=a2fc3b1f195855a1915d216a0e649bc3" alt="Lookup Serach Dimension Pn" width="746" height="536" data-path="images/lookups/lookup-serach-dimension.png" />
3. Click on the + in the database header, select dimension again, and select an existing dimension or create another new one. **This is the lookup value that will populate in other databases** based on the dimension that you set in Step 2.
   <img src="https://mintcdn.com/runway-5055a12e/QgAyEmvdZUWT1iiY/images/lookups/lookup-create-dimension.png?fit=max&auto=format&n=QgAyEmvdZUWT1iiY&q=85&s=318681b8e5a42ad5b2f94664af676f46" alt="Lookup Create Dimension Pn" width="748" height="810" data-path="images/lookups/lookup-create-dimension.png" />
4. Click Add item in order to create a new row in the database. Because these dimensions are not driven by a data source, **all attributes will need to be manually added**, either by typing them in, copy/pasting into the database, or selecting from the options available.
   <img src="https://mintcdn.com/runway-5055a12e/QgAyEmvdZUWT1iiY/images/lookups/lookup-fill-cell.png?fit=max&auto=format&n=QgAyEmvdZUWT1iiY&q=85&s=4d95b438c75c469ea04a94afcb14545e" alt="Lookup Fill Cell Pn" width="1286" height="718" data-path="images/lookups/lookup-fill-cell.png" />
5. Click Add item in order to create a new row in the database. Because these dimensions are not driven by a data source, **all attributes will need to be manually added**, either by typing them in, copy/pasting into the database, or selecting from the options available.

## Populating lookups in other databases

Once your lookup table is set, you can leverage it in any dimensional database in Runway. Notably, this excludes legacy databases that utilize fields (dimensions or drivers with only column-level formulas), which are exclusively scoped to [HRIS databases](https://docs.runway.com/concepts/databases/hris-databases).

In order to populate a lookup, navigate to a database that includes the dimension you will be using to designate the lookup value (GL Account in the examples above). Click on the + in the database header in order to create a new column and select Lookup.

<img src="https://mintcdn.com/runway-5055a12e/cPpS0_J0f_14t9nM/images/lookups/add-lookup.png?fit=max&auto=format&n=cPpS0_J0f_14t9nM&q=85&s=f50f1d9c40215b639207883e5cf95861" alt="Add Lookup Pn" width="510" height="428" data-path="images/lookups/add-lookup.png" />

Once selected, you’ll see all possible dimensional lookup combinations (from all databases) and you’ll select the one that matches the mapping you’re expecting. The best way to read these options is to note the headers in this menu. The highlighted selection below is saying that we want to **insert the values of** the Parent Category dimension **from** the Inc Statement Mapping database **using the lookup** GL Account dimension.

<img src="https://mintcdn.com/runway-5055a12e/QgAyEmvdZUWT1iiY/images/lookups/lookup-setup.png?fit=max&auto=format&n=QgAyEmvdZUWT1iiY&q=85&s=1ade18be464cdf40ad761b37fed1cb3e" alt="Lookup Setup Pn" width="1308" height="726" data-path="images/lookups/lookup-setup.png" />

Once selected, all values that have been properly mapped in the lookup table will populate. These will automatically flow through as dimensions are updated and maintained in the lookup table itself, as noted in steps 5 above.

## Lookups FAQs

<Accordion title="How can I tell if a lookup is empty or has not been set? ">
  The easiest way to do this is to filter on the database where the lookup column has been added and filter for if that lookup value is empty. Any line items with an unpopulated cell in this lookup column is an indication that it has not been set in your lookup table.

  <img src="https://mintcdn.com/runway-5055a12e/cPpS0_J0f_14t9nM/images/lookups/empty-lookup-filter.png?fit=max&auto=format&n=cPpS0_J0f_14t9nM&q=85&s=8e76de098af80c750617091b0547327a" alt="Empty Lookup Filter Pn" width="1388" height="310" data-path="images/lookups/empty-lookup-filter.png" />
</Accordion>

<Accordion title="Can I do lookups with driver values? ">
  Not at this time but we intend to make this available in the future.
</Accordion>

<Accordion title="Can I set a lookup based on multiple dimensions? ">
  For example, if Dimension A *and* Dimension B, then map Dimension C. We do not have a productized way to do this from a single database, however, there are some creative workarounds for this, pending your use case. Please reach out to your CX Manager to explore this more!
</Accordion>
