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
docId
The ID of the Coda document with the lookup table
tableId
The ID or name of the lookup table
lookupColumn
Column name with the lookup key
valueColumn
Column name with the lookup value
valueToLookup
Value to lookup in the lookup column
fallbackValue
Value to return if not found
failIfMultiple
Throw error if multiple values found in the lookup column
multipleValueSeparator
Separator for multiple values
There are no rows in this table

popcorn

DEMO

Configuration
Name
Value
Created by
Scope
Default Time Zone
EST
Team
Default Currency
$
Team
Default Start Time
8 am
Team
Default Start Time
1 pm
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.