lookup-magic
Share
Explore

lookup-magic
Lookup Magic Documentation

Find a value in a lookup table in any document
overview-pages-2

USE CASES

Configuration Management: You have a lookup table with configuration values. You want to use those configuration values in other documents.
Product Lookup: You want to product properties based on a product ID.

crane

SETTING UP THE PACK

Install the pack.
Connect it to your Coda account.
sigma

FORMULAS

LookupValue

Find single column value(s) in a table based on a lookup key
1
Required
docId
string
The ID of the Coda document with the lookup table
2
Required
tableId
string
The ID or name of the lookup table
3
Required
lookupColumn
string
Column name with the lookup key
4
Required
valueColumn
string
Column name with the lookup value
5
Required
valueToLookup
string
Value to lookup in the lookup column
6
Optional
fallbackValue
string
Value to return if not found
7
Optional
failIfMultiple
boolean
Throw error if multiple values found in the lookup column
8
Optional
multipleValueSeparator
Separator for multiple values
There are no rows in this table

popcorn

DEMO

Configuration
0
1
2
3
4
Name
Value
Created by
Scope
Default Time Zone
EST
Troy Larson
Team
Default Currency
$
Troy Larson
Team
Default Start Time
8 am
Troy Larson
Team
Default Start Time
1 pm
Troy Larson
Team
There are no rows in this table

Lookup a Single Value

We’re looking up a single value by passing the doc id (this doc ID), the table ID (the table ID of the Configuration table), the lookup column (Name), the value column (Value) and the value we want to find “Default Time Zone” . . . it will lookup the value and return a single string.
The default time zone is:
EST

Lookup a Single Value With Fallback

Same as previous, except we’re looking for “Default Language.” This doesn’t exist as a lookup value, so we’re providing “English” as a fallback value in case it doesn’t exist.
The default time zone is:
English

Lookup a Value With Multiple Values

We have two default start times to choose from, so we can return multiple values if found.
The default time zone is:
1 pm,8 am

Lookup a Value, But Return Blank if Multiple

We have two default start times to choose from, but we don’t want anything if there’s more than one matching value.
The default time zone is:
[ ]


Want to print your doc?
This is not the way.
Try clicking the ⋯ next to your doc name or using a keyboard shortcut (
CtrlP
) instead.