Formula: In()
Category: Lists (Arrays)
In()
Checks if a value is in a list
Or, as one might say...
In() uses two parameters. The second parameter is called Value, and just as in with List() and ListCombine(), it is a repeating parameter. This means you can search by inserting a single formula chip (i.e., of a column) or input as many or as few values as you would like to search in.
Search
In(Search, Value)
This is the item/vaue that you want to search for within a list.
Value
In(Search, Value)
This is the list or set of values you want to search in.
A Simple Example
The humble In() - while only 2 letters long, it is one of the most useful formulas you will come across in Coda. Let’s see how it works.
In() checks to see if a singular value is in a list of any size and it returns true/false.
True: If the value is in the target list False: if the value is not in the target list Type any word or animal into the text-box below to check if that word is in the . If you are having trouble thinking of words, try these: dog, keyboard, google, coda, park is NOT in the People Database
How Can I Use In()?
In() is a powerful formula used in conjunction with Filter() - Lets view two ways we can use it.
1. Use In() to create recurring tasks, schedule tweets, log payments
While many use Automations in their Coda docs, most don’t know this small trick and don’t take advantage of Automations across their docs.
Automations have three triggers:
But the time based triggers only allow you to choose static time values such as every Monday, or every hour.
Using the trick below you can define custom dates with no set schedule on which your automations can trigger to create recurring tasks, schedule tweets with the twitter-pack, or log expenses/payments. Below is a table of recurring tasks that acts as a template (the Blue Table) and a table of actual tasks that will be used and checked off by a team (the Yellow Table). You can use an automation to add tasks from the template to the Actual Tasks table that only triggers on the days you set in the template.
Go view the actual automation in the Automation section (titled “Add Recurring Tasks) of this doc or view its explanation below. The below also mimics the automations action. Try it out! When Condition: Set an automation that will trigger every single day at 6am If Condition: Check if Today’s date exists inside the blue template table. If it does, the automation will continue to the Then section. If not, the automation will do nothing Then Condition: This part of the automation will add a row to the yellow table for each of the tasks in the blue table that are marked with todays date No relevant tasks for today, try changing the dark blue column below to whatever day of the week it is right now
2. Compare the differences/similarities between two tables
In() allows easy comparison between two lists.
The lists have these elements in common: The items that List 2 does not contain that are in List 1: The items that List 1 does not contain that are in List 2: Where this gets really powerful is when you start to compare two tables and run actions based off those differences.
Let’s say you are exporting data from LinkedIn—which currently does not have a pack—and you want to update a list of your contacts with that data and keep those two tables in sync. Watch how the white button below takes the data in the blue table and updates the yellow table to match it
Data copy/pasted from LinkedIn
Rows to add to Master Coda Table:
Master Coda Table