Skip to content

Formulas

Collections

Count(list)

[Copy link](/content/formulas#Count "Permalink to this formula"/index.html)

Counts the size of a list

Planets.Count()

8

Planets.Filter(Moons.Count() > 1)

[Mars, Jupiter, Saturn, Uranus, Neptune]

Inputs

list...A table, column, or list of values

Output

Outputs the count of non-blank values in list(s).

CountUnique(value)

[Copy link](/content/formulas#CountUnique "Permalink to this formula"/index.html)

Counts number of unique values

CountUnique(1, 2, 3, 3, 3, 4)

4

Inputs

value...A value or list of values to be counted

Output

Outputs a count of all of the unique value(s) ignoring duplicates and blank values. Counts each unique item in a value if it is a list.

Find(needle, haystack, startAt, ignoreCase, ignoreAccents)

[Copy link](/content/formulas#Find "Permalink to this formula"/index.html)

Get the position of a value

Find("world", "hello world")

7

Find("world", "Hello World", 0, true)

7

Find("varlden", "hej världen", 0, false, true)

5

Find(1, List(2, 4, 6))

-1

Find("be", List("to", "be", "or", "not", "to", "be"), 3)

6

Required inputs

needleA value you wish to findhaystackA string or list you want to find the needle in

Optional inputs

startAtThe position to search from. Counts from 1 (default)ignoreCaseWhether to ignore case when searching text. Defaults to false.ignoreAccentsWhether to ignore diacritics (accents, umlauts, cedillas, etc.) when searching text. Defaults to false.

Output

Outputs the first position of needle in haystack starting at startAt, or -1 if not found. Works with text and lists.

MaxBy(list, compareBy)

[Copy link](/content/formulas#MaxBy "Permalink to this formula"/index.html)

Get the row of a table with the maximum value in the provided column, or item in a list with the maximum value by the provided formula.

Planets.MaxBy(Diameter)

Jupiter

List(3, 5, 7).MaxBy(CurrentValue % 6)

5

Inputs

listA table, column, or list of valuescompareByA formula to evaluate for each item and compare by. This can be a column if list is a table and can reference CurrentValue.

Output

Outputs the maximum item inlist based on evaluating compareBy over each item. This will return the item in the original list, not the value that is used for comparison - use Max(list.compareBy) instead to only fetch the maximum compared value.

MinBy(list, compareBy)

[Copy link](/content/formulas#MinBy "Permalink to this formula"/index.html)

Get the row of a table with the minimum value in the provided column, or item in a list with the minimum value by the provided formula.

Planets.MinBy(Diameter)

Mercury

List(3, 5, 7).MinBy(CurrentValue % 6)

7

Inputs

Output

Outputs the minimum item in list based on evaluating compareBy over each item. This will return the item in the original list, not the value that is used for comparison - use Min(list.compareBy) instead to only fetch the minimum compared value.

Slice(value, start, end)

[Copy link](/content/formulas#Slice "Permalink to this formula"/index.html)

Get part of a list or text

Slice("Hello world", 5, 9)

o wor

List("Cat", "Dog", "Mouse").Slice(2, 3)

[Dog, Mouse]

Required inputs

valueA text string or list of valuesstartThe position to start from. Counts from 1

Optional inputs

endThe position to end at. Counts from 1

Output

Outputs a part of the provided value based on the start and end positions.

Sort(dataset, ascending, sortBy, sortByCount)

[Copy link](/content/formulas#Sort "Permalink to this formula"/index.html)

Sort a list or column

List(1, 5, 3, 4, 2).Sort()

[1, 2, 3, 4, 5]

Planets.Sort(false, Diameter)

[Jupiter, Saturn, Uranus, Neptune, Earth, Venus, Mars, Mercury]

Required inputs

datasetA list or column to be sorted

Optional inputs

ascendingTrue for ascending or False for descending. Defaults to True.sortByThe property of dataset to sort on. Can only be specified if each item in dataset is a row or an object.sortByCountTrue to order elements by count or False to order elements by value. Defaults to False.

Output

Outputs dataset in sorted order. Sort order and criteria are specified by the ascending, sortBy and sortByCount inputs.

Splice(value, start, deleteCount, insertValue)

[Copy link](/content/formulas#Splice "Permalink to this formula"/index.html)

Remove and add to a list or text

Splice(List(1, 2, 3, 4, 5), 2, 3, List("Dog", "Cat"))

[1, Dog, Cat, 5]

Inputs

valueA list or text to modifystartThe position to start from. Counts from 1deleteCountThe number of items or characters to deleteinsertValue...The value, text, or list of values to insert

Output

Outputs value with deleteCount values removed and insertValue(s) added at start position.

Dates

Created(object)

[Copy link](/content/formulas#Created "Permalink to this formula"/index.html)

Get the created date/time for a row or other object

ExampleTable.Created()

3/8/2017 9:23:18 AM

Inputs

objectA Coda object. This includes tables, views, columns, rows, and docs.

Output

Outputs the created date/time for object.

CurrentTimezone()

[Copy link](/content/formulas#CurrentTimezone "Permalink to this formula"/index.html)

Get the user's current time zone

CurrentTimezone()

{timezone: "Pacific/Honolulu", offset: -10}

Output

Outputs the user's current time zone.

Date(year, month, day)

[Copy link](/content/formulas#Date "Permalink to this formula"/index.html)

Create a date value

Date(1985, 1, 4)

1/4/1985

Date(2019, 2, 5)

2/5/2019

Inputs

yearThe year as a numbermonthThe month as a numberdayThe day as a number

Output

Outputs the date of the provided year, month, and day.

DateTime(year, month, day, hour, minute, second)

[Copy link](/content/formulas#DateTime "Permalink to this formula"/index.html)

Create a date time value

DateTime(1985, 1, 4, 10, 30)

1/4/1985 10:30 AM

Date(2019, 2, 5, 17, 30, 30)

2/5/2019 5:30:30 PM

Required inputs

yearThe year as a numbermonthThe month as a numberdayThe day as a number

Optional inputs

hourThe hour as a numberminuteThe minute as a numbersecondThe second as a number

Output

Outputs the date of the provided year, month, day, hour, minute, and second.

DateTimeTruncate(dateOrTime, unit)

[Copy link](/content/formulas#DateTimeTruncate "Permalink to this formula"/index.html)

Round a date/time

Time(1, 30, 45).DateTimeTruncate("minute")

1:30 AM

DateTime(2023, 4, 28, 1, 30, 45).DateTimeTruncate("hour")

4/28/2023 1:00 AM

Inputs

dateOrTimeA time or date/timeunitThe unit to round to. Can be "year", "quarter", "month", "week", "day", "hour", "minute" or "second".

Output

Outputs dateOrTime rounded to the nearest unit.

DateToEpoch(date)

[Copy link](/content/formulas#DateToEpoch "Permalink to this formula"/index.html)

Convert date to epoch

DateToEpoch("3/10/2017 3:14:24 PM")

1489187664

Inputs

dateThe date to convert

Output

Outputs date as an epoch time (the number of seconds since Jan 1st, 1970).

Day(dateTime)

[Copy link](/content/formulas#Day "Permalink to this formula"/index.html)

Get the day-of-month from a date/time

Day(Date(2013, 4, 18))

18

Inputs

dateTimeA date/time

Output

Outputs the day of month of the given dateTime as a number.

DocumentTimezone()

[Copy link](/content/formulas#DocumentTimezone "Permalink to this formula"/index.html)

Get the document's timezone

DocumentTimezone()

{timezone: "America/Los_Angeles", offset: -7}

Output

Outputs the document's timezone.

EndOfMonth(dateTime, monthOffset)

[Copy link](/content/formulas#EndOfMonth "Permalink to this formula"/index.html)

Get the last day of a given month

EndOfMonth(Today(), 3)

6/30/2017

EndOfMonth(Date(2017, 03, 20), 1)

4/30/2017

Inputs

dateTimeA date/timemonthOffsetThe number of months to move forward or backwards. 0 is month of dateTime. 1 is the following month, -1 is the previous month.

Output

Outputs the date for the last day of the month of dateTime plus monthOffset.

EpochToDate(epochTime)

[Copy link](/content/formulas#EpochToDate "Permalink to this formula"/index.html)

Convert epoch time to date

EpochToDate(1489187664)

3/10/2017 3:14:24 PM

Inputs

epochTimeThe number of seconds since Jan 1st, 1970

Output

Outputs epochTime as a date.

Hour(dateOrTime)

[Copy link](/content/formulas#Hour "Permalink to this formula"/index.html)

Get the hour from a date/time

Hour(DateTime(1985, 1, 4, 10, 30))

10

Hour(Time(1, 30, 45))

1

Inputs

dateOrTimeA time or date/time

Output

Outputs the hour of the given dateOrTime as a number.

IsoWeekNumber(dateTime)

[Copy link](/content/formulas#IsoWeekNumber "Permalink to this formula"/index.html)

Get the week number of a date in the ISO week numbering system, where week 1 contains the first Thursday of the year and weeks start on Monday

IsoWeekNumber(Date(2019, 2, 5))

6

Inputs

dateTimeA date/time

Output

Outputs the week of dateTime as a number between 1 and 52.

IsoWeekday(dateTime)

[Copy link](/content/formulas#IsoWeekday "Permalink to this formula"/index.html)

Get the day-of-week of a date/time as a number in the ISO week numbering system, where Monday is 1.

IsoWeekday(Date(2019, 2, 5))

2

Inputs

dateTimeA date/time

Output

Outputs the day-of-week of dateTime as a number between 1 and 7.

Minute(dateOrTime)

[Copy link](/content/formulas#Minute "Permalink to this formula"/index.html)

Get the minute from a date/time

Hour(DateTime(1985, 1, 4, 10, 30))

30

Minute(Time(1, 30, 45))

30

Inputs

dateOrTimeA time or date/time

Output

Outputs the minute of the given dateOrTime as a number.

Modified(object)

[Copy link](/content/formulas#Modified "Permalink to this formula"/index.html)

Get the modified date/time for a row or other object

Table.Modified()

3/10/2017 8:56:23 AM

Inputs

objectA Coda object. This includes tables, views, columns, rows, and docs.

Output

Outputs the modified date/time for object.

Month(dateTime)

[Copy link](/content/formulas#Month "Permalink to this formula"/index.html)

Get the month from a date

Month(Date(2013, 4, 18))

4

Inputs

dateTimeA date/time

Output

Outputs the month of the given dateTime as a number.

MonthName(dateTime, format)

[Copy link](/content/formulas#MonthName "Permalink to this formula"/index.html)

Get the month name for a date

MonthName(Date(2013, 4, 18))

April

Required inputs

dateTimeA date/time

Optional inputs

formatUse "MMM" for appreviated month name, or "MMMM" for full month name.

Output

Outputs the month name for given dateTime as text.

NetWorkingDays(startDate, endDate, holidays)

[Copy link](/content/formulas#NetWorkingDays "Permalink to this formula"/index.html)

Count working days between dates. Customize working days in region and date settings.

NetWorkingDays(Date(2016, 2, 1), Date(2016, 2, 3))

3

Required inputs

startDateThe date to count fromendDateThe date to count to

Optional inputs

holidaysA list of dates to exclude from the count (e.g. holidays)

Output

Outputs the count of working days between startDate and endDate excluding holidays. Customize working days in region and date settings.

Now(precision)

[Copy link](/content/formulas#Now "Permalink to this formula"/index.html)

Get the current date/time

Now()

3/10/2017 8:56:23 AM

Optional inputs

precisionThe precision of the time returned. Valid options are "second" (default), "minute", "hour", and "day", as well as their plural equivalents.

Output

Outputs the current date and time. Updates based on precision specified.

RelativeDate(dateTime, months)

[Copy link](/content/formulas#RelativeDate "Permalink to this formula"/index.html)

Add months to a date/time

RelativeDate(Date(2016, 1, 1), 2)

3/1/2016

Inputs

dateTimeA date/timemonthsMonths to add (can be negative)

Output

Outputs months added to dateTime rounded to the day.

Second(dateOrTime)

[Copy link](/content/formulas#Second "Permalink to this formula"/index.html)

Get the "second" from a date/time

Hour(DateTime(1985, 1, 4, 10, 30, 50))

50

Second(Time(1, 30, 45))

45

Inputs

dateOrTimeA time or date/time

Output

Outputs the seconds part of the given dateOrTime as a number.

Time(hour, minute, second)

[Copy link](/content/formulas#Time "Permalink to this formula"/index.html)

Create a time value

Time(1, 30, 45)

1:30:45 AM

Time(17, 0, 0)

5:00 PM

Inputs

hourThe hour as a numberminuteThe minute as a numbersecondThe second as a number

Output

Outputs the time of the provided hour, minute, and second.

TimeValue(time)

[Copy link](/content/formulas#TimeValue "Permalink to this formula"/index.html)

Convert a time to a number

TimeValue("5:30:18 PM")

0.729375

Inputs

timeA time or date/time

Output

Outputs time as a decimal ratio of the day.

ToDate(text)

[Copy link](/content/formulas#ToDate "Permalink to this formula"/index.html)

Convert text into a date value. Respects the doc's date order setting.

ToDate("2013-03-14")

3/14/2013

Inputs

textText in a recognized date format such as "MM-DD-YY" or "YYYY/MM/DD"

Output

Outputs the value of text parsed into a date. Outputs blank if text can't be parsed.

ToDateTime(datetime)

[Copy link](/content/formulas#ToDateTime "Permalink to this formula"/index.html)

Converts text into a date/time. Respects the doc's date order setting.

ToDateTime("2013-03-14 18:13:23")

3/14/2013 6:13:23 PM

Inputs

datetimeText in a recognized date format such as "MM-DD-YY HH:MM:SS"

Output

Outputs the value of datetime parsed into a date and time. Outputs blank if datetimecan't be parsed.

ToTime(value)

[Copy link](/content/formulas#ToTime "Permalink to this formula"/index.html)

Converts a value into a time

ToTime("5:30:18 PM")

5:30:18 PM

ToDateTime("2013-03-14 18:13:23").ToTime()

6:13:23 PM

Inputs

valueA value to convert

Output

Outputs the value of value parsed into a time. Outputs blank if valuecan't be parsed.

Today()

[Copy link](/content/formulas#Today "Permalink to this formula"/index.html)

Get today's date

Today()

3/8/2017

Today() + Days(14)

3/22/2017

Output

Outputs the current date. Updates daily.

WeekNumber(dateTime, returnType)

[Copy link](/content/formulas#WeekNumber "Permalink to this formula"/index.html)

Get the week number of a date, where week 1 contains Jan 1. Respects the doc’s first day of week setting. Use "IsoWeekNumber()" if week 1 should contain the first Thursday of the year.

WeekNumber(Date(2019, 2, 5))

6

Required inputs

dateTimeA date/time

Optional inputs

returnTypeCurrently unused parameter

Output

Outputs the week of dateTime as a number between 1 and 52.

Weekday(dateTime, returnType)

[Copy link](/content/formulas#Weekday "Permalink to this formula"/index.html)

Get the day-of-week of a date/time as a number. Respects the doc’s first day of week setting.

Weekday(Date(2019, 2, 5))

3

Required inputs

dateTimeA date/time

Optional inputs

returnTypeCurrently unused parameter

Output

Outputs the day-of-week of dateTime as a number between 1 and 7.

WeekdayName(dateTime)

[Copy link](/content/formulas#WeekdayName "Permalink to this formula"/index.html)

Get the day-of-week of a date as text

WeekdayName(Date(2019, 2, 5))

Tuesday

Inputs

dateTimeA date/time

Output

Outputs the day-of-week of dateTime as text ("Monday", "Tuesday", etc.).

Workday(startDate, numWorkingDays, holidays)

[Copy link](/content/formulas#Workday "Permalink to this formula"/index.html)

Adds working days to a date. Customize working days in region and date settings.

Workday(Date(2016, 2, 1), 5)

2/8/2016

Required inputs

startDateThe date to count fromnumWorkingDaysNumber of working days to move the date forward. Customize working days in region and date settings.

Optional inputs

holidaysA list of dates to exclude from the count (e.g. holidays)

Output

Outputs a date based on your startDate plus the numWorkingDays you wish to move forward skipping over any dates included in holidays.

Year(dateTime)

[Copy link](/content/formulas#Year "Permalink to this formula"/index.html)

Get the year of a date

Year(Date(2019, 2, 5))

2019

Inputs

dateTimeA date/time

Output

Outputs the year of the given dateTime as a number.

Duration

Days(days)

[Copy link](/content/formulas#Days "Permalink to this formula"/index.html)

Create a time duration (for days)

Days(14)

14 days

Date(2019, 2, 5) + Days(7)

2/12/2019

Inputs

daysThe number of days

Output

Outputs a time duration for the specified number of days.

Duration(days, hours, minutes, seconds)

[Copy link](/content/formulas#Duration "Permalink to this formula"/index.html)

Create a time duration

Duration(4, 3, 2, 1)

4 days 3 hrs 2 mins 1 sec

Optional inputs

daysThe number of dayshoursThe number of hoursminutesThe number of minutessecondsThe number of seconds

Output

Outputs a time duration for the specified number of days, hours, minutes, and seconds.

Hours(hours)

[Copy link](/content/formulas#Hours "Permalink to this formula"/index.html)

Create a time duration (for hours)

Hours(12)

12 hrs

Hours(36)

1 day 12 hours

Inputs

hoursThe number of hours

Output

Outputs a time duration for the specified number of hours.

Minutes(minutes)

[Copy link](/content/formulas#Minutes "Permalink to this formula"/index.html)

Create a time duration (for minutes)

Minutes(3)

3 min

Minutes(84)

1 hour 24 mins

Inputs

minutesThe number of minutes

Output

Outputs a time duration for the specified number of minutes.

Seconds(seconds)

[Copy link](/content/formulas#Seconds "Permalink to this formula"/index.html)

Create a time duration (for seconds)

Seconds(38)

38 seconds

Seconds(80)

1 min 20 seconds

Inputs

secondsThe number of seconds

Output

Outputs a time duration for the specified number of seconds.

ToDays(duration)

[Copy link](/content/formulas#ToDays "Permalink to this formula"/index.html)

Convert a time duration into a number of days

ToDays(Hours(12))

0.5

ToDays(Duration(days: 1, hours: 6))

1.25

Inputs

durationThe time duration to convert

Output

Outputs a number of days for the specified duration.

ToHours(duration)

[Copy link](/content/formulas#ToHours "Permalink to this formula"/index.html)

Convert a time duration into a number of hours

ToHours(Minutes(120))

2

ToHours(Duration(days: 1, hours: 6))

30

Inputs

durationThe time duration to convert

Output

Outputs a number of hours for the specified duration.

ToMinutes(duration)

[Copy link](/content/formulas#ToMinutes "Permalink to this formula"/index.html)

Convert a time duration into a number of minutes

ToMinutes(Seconds(120))

2

ToMinutes(Duration(days: 1, hours: 6))

1800

Inputs

durationThe time duration to convert

Output

Outputs a number of minutes for the specified duration.

ToSeconds(duration)

[Copy link](/content/formulas#ToSeconds "Permalink to this formula"/index.html)

Convert a time duration into a number of seconds

ToSeconds(Minutes(120))

7200

ToSeconds(Duration(days: 1, hours: 6))

108000

Inputs

durationThe time duration to convert

Output

Outputs a number of seconds for the specified duration.

Filters

AverageIf(list, expression)

[Copy link](/content/formulas#AverageIf "Permalink to this formula"/index.html)

Compute the average of a filtered list of numbers

List(1,2,3,4).AverageIf(CurrentValue > 2)

3.5

Inputs

listList of numbers or number columnexpressionA formula returning a boolean value (true or false). Use "currentValue" to reference the current item in the list. When filtering a table, "currentValue" will refer to a row.

Output

Outputs the average of a list of numbers for values matching expression. Blank values are ignored.

CountIf(list, expression)

[Copy link](/content/formulas#CountIf "Permalink to this formula"/index.html)

Get the count for a filtered list

Planets.CountIf(Moons.Count() > 1)

5

CountIf(List(1,2,3,4), CurrentValue > 2)

2

Inputs

listA table, column, or list of valuesexpressionA formula returning a boolean value (true or false). Use "currentValue" to reference the current item in the list. When filtering a table, "currentValue" will refer to a row.

Output

Outputs the count of values in list for values matching expression. Blank values are ignored.

Filter(list, expression)

[Copy link](/content/formulas#Filter "Permalink to this formula"/index.html)

Gets a list of values that match your filter

Fruits.Filter(Color = "Green")

[@Lime, @Kiwi, @Honeydew]

List(1,2,3,4).Filter(CurrentValue > 2)

[3, 4]

Inputs

Output

Outputs a list of all values in list that match expression.

IsFromTable(row, table)

[Copy link](/content/formulas#IsFromTable "Permalink to this formula"/index.html)

Check if a reference is from a table

IsFromTable(@Bill Clinton, [Presidents])

true

Inputs

rowThe row to checktableThe table to search

Output

Outputs True if row is a row in table. Otherwise outputs False.

Lookup(table, column, match value)

[Copy link](/content/formulas#Lookup "Permalink to this formula"/index.html)

Get the rows from a table that match your filter

Lookup(Tasks, Project, thisRow)

[@Get estimate, @Schedule work, @Get permit]

Lookup(Tasks, Status, "Not Started")

[@Schedule work, @Get permit]

Inputs

tableThe table to get rows fromcolumnThe column to search in tablematch valueThe value to search for in column

Output

Outputs the rows from a table where column is the same as match value. We recommend using Table.Filter() instead.

Matches(value, control)

[Copy link](/content/formulas#Matches "Permalink to this formula"/index.html)

Checks if a Coda control matches a value

[Color Column].Matches([Color Select Control])

true

Inputs

valueA value to check against the controlcontrolA control to check against the value

Output

Outputs True if the given value matches the control. Otherwise outputs False.

SumIf(list, expression)

[Copy link](/content/formulas#SumIf "Permalink to this formula"/index.html)

Compute the sum for a filtered list

List(1,2,3,4).SumIf(CurrentValue > 2)

7

Inputs

Output

Outputs the sum of a list of numbers for values matching expression. Blank values are ignored.

Formats

FormatCurrency(currency code, value, format, precision, symbol position)

[Copy link](/content/formulas#FormatCurrency "Permalink to this formula"/index.html)

Formats the provided number to a currency

FormatCurrency("USD", 9)

$9.00

FormatCurrency("EUR", -14.25, "accounting")

€ (14.25)

FormatCurrency("ILS", -9.8889, "", 3)

-₪9.889

FormatCurrency("USD", 9, "", "after")

9.00$

Required inputs

currency codeThree-letter currency code e.g., "USD" or symbol e.g., "$”valueThe value to format

Optional inputs

formatOne of "currency" (default), "accounting", or "financial"precisionNumber of digits past the decimal to showsymbol positionOne of "before" (default) or "after"

FormatNumber(value, grouping, precision)

[Copy link](/content/formulas#FormatNumber "Permalink to this formula"/index.html)

Formats the provided number

FormatNumber(123456.789, true, 2)

123,456.80

Required inputs

valueValue to format

Optional inputs

groupingWhether to show grouping to the left of the decimalprecisionNumber of digits past the decimal to show

FormatPercent(value, grouping, precision)

[Copy link](/content/formulas#FormatPercent "Permalink to this formula"/index.html)

Formats the provided number to a percentage

FormatPercent(12.4567, true, 2)

1,234.57%

Required inputs

valueValue to format

Optional inputs

groupingWhether to show grouping to the left of the decimalprecisionNumber of digits past the decimal to show

Info

IsAnyText(value)

[Copy link](/content/formulas#IsAnyText "Permalink to this formula"/index.html)

Checks if a value is plain text or rich text

IsAnyText("Hello world")

true

IsAnyText(BulletedList(List("Hello", "world")))

true

IsAnyText(14)

false

Inputs

valueA value to check

Output

Outputs True if the given value is plain text or rich text. Otherwise, outputs False.

IsBlank(value)

[Copy link](/content/formulas#IsBlank "Permalink to this formula"/index.html)

Check if a value is blank

IsBlank("")

true

IsBlank("Hello world")

false

Inputs

valueA value to check

Output

Outputs True if the given value is blank. Otherwise, outputs False.

IsDate(value)

[Copy link](/content/formulas#IsDate "Permalink to this formula"/index.html)

Checks if a value is a date

IsDate("2014-01-1")

true

IsDate("Hello world")

false

Inputs

valueA value to check

Output

Outputs True if the given value is a date. Otherwise, outputs False.

IsLogical(value)

[Copy link](/content/formulas#IsLogical "Permalink to this formula"/index.html)

Checks if a value is true or false

IsLogical(True)

true

IsLogical("Hello world")

false

Inputs

valueA value to check

Output

Outputs True if the given value is True or False. Outputs False if it's neither.

IsNotBlank(value)

[Copy link](/content/formulas#IsNotBlank "Permalink to this formula"/index.html)

Checks if a value is not blank

IsNotBlank("")

false

IsNotBlank("Hello world")

true

Inputs

valueA value to check

Output

Outputs True if the given value is not blank. Otherwise, outputs False.

IsNotText(value)

[Copy link](/content/formulas#IsNotText "Permalink to this formula"/index.html)

Checks if a value is not text

IsNotText(14)

true

IsNotText("Hello world")

false

Inputs

valueA value to check

Output

Outputs True if the given value is not blank. Otherwise, outputs False.

IsNumber(value)

[Copy link](/content/formulas#IsNumber "Permalink to this formula"/index.html)

Checks if a value is a number

IsNumber(14)

true

IsNumber("Hello world")

false

Inputs

valueA value to check

Output

Outputs True if the given value is a number. Otherwise, outputs False.

IsPlainText(value)

[Copy link](/content/formulas#IsPlainText "Permalink to this formula"/index.html)

Checks if a value is plain text

IsPlainText("Hello world")

true

IsPlainText(14)

false

Inputs

valueA value to check

Output

Outputs True if the given value is plain text. Otherwise, outputs False. Will output False if value is rich text.

IsRichText(value)

[Copy link](/content/formulas#IsRichText "Permalink to this formula"/index.html)

Checks if a value is rich text

IsRichText(BulletedList(List("Hello", "world")))

true

IsRichText("Hello world")

false

Inputs

valueA value to check

Output

Outputs True if the given value is rich text. Otherwise, outputs False. Will output False if value is plain text.

ToNumber(value, base)

[Copy link](/content/formulas#ToNumber "Permalink to this formula"/index.html)

Convert a value to a number

ToNumber("134")

134

ToNumber("FF", 16)

255

Required inputs

valueA value to convert

Optional inputs

baseThe base or radix used to parse value. Defaults to 10.

Output

Outputs value as a number if conversion with base is possible. Otherwise outputs value.

ToText(value)

[Copy link](/content/formulas#ToText "Permalink to this formula"/index.html)

Convert a value to text

ToText(11431)

"11431"

Inputs

valueA value to convert

Output

Outputs value as text.

Lists

All(list, expression)

[Copy link](/content/formulas#All "Permalink to this formula"/index.html)

Checks if an expression evaluates to true for all values in a list

List(1, 2, 3).All(CurrentValue > 2)

false

[Table 1].Status.All(CurrentValue = "Is Done")

true

Required inputs

listA table, column, or list of values

Optional inputs

expressionA formula returning a boolean value (true or false). Defaults to `CurrentValue`.

Output

Outputs True if the result for evaluating expression on every value in list is true.

Any(list, expression)

[Copy link](/content/formulas#Any "Permalink to this formula"/index.html)

Checks if an expression evaluates to true for any value in a list

List(1, 2, 3).Any(CurrentValue > 2)

true

[Table 1].Owner.Any(CurrentValue = User())

false

Required inputs

listA table, column, or list of values

Optional inputs

expressionA formula returning a boolean value (true or false). Defaults to `CurrentValue`.

Output

Outputs True if the result for evaluating expression on any value in list is true.

Contains(value, search)

[Copy link](/content/formulas#Contains "Permalink to this formula"/index.html)

Checks if a list contains any value from a list

Contains("Dog", "Cat", "Mouse")

False

Contains("Dog", "Cat", "Mouse", "Dog")

True

List("Dog", "Giraffe").Contains("Cat", "Mouse", "Dog")

True

Inputs

valueA value or list of values to search insearch...A value or list of values to search for

Output

Outputs True if any value in search exists in value.

ContainsAll(value, search)

[Copy link](/content/formulas#ContainsAll "Permalink to this formula"/index.html)

Checks if a list contains all values from a list

ContainsAll("Dog", "Cat", "Mouse")

False

ContainsAll(List("Cat", "Rabbit"), "Cat", "Mouse")

False

List("Cat", "Mouse", "Rabbit").ContainsAll(List("Cat", "Mouse"))

True

Inputs

valueA value or list of values to search insearch...A value or list of values to search for

Output

Outputs True if all values in search exists in value.

ContainsOnly(value, search)

[Copy link](/content/formulas#ContainsOnly "Permalink to this formula"/index.html)

Checks if a list contains only values from a list

ContainsOnly("Dog", List("Dog", "Mouse"))

False

List("Dog", "Mouse", "Cat").ContainsOnly("Cat", "Mouse")

False

List("Dog", "Mouse").ContainsOnly("Mouse", "Dog")

True

ContainsOnly(List("Dog", "Dog"), "Dog")

True

Inputs

valueA value or list of values to search insearch...A value or list of values to search for

Output

Outputs True if only values in search exist in value.

CountAll(list)

[Copy link](/content/formulas#CountAll "Permalink to this formula"/index.html)

Counts the size of a list including blank values

Planets.CountAll()

8

List("a", "b", "").CountAll()

3

Inputs

listA table, column, or list of values

Output

Outputs the count of values in list, including blank values.

Duplicates(value)

[Copy link](/content/formulas#Duplicates "Permalink to this formula"/index.html)

Get duplicate values

List("Dog", "Dog", "Cat", "Mouse", "Cat").Duplicates()

[Dog, Cat]

List(1, 2, 3).Duplicates()

[]

Inputs

value...A value to check for duplication

Output

Outputs a list of values which appear multiple times.

First(list)

[Copy link](/content/formulas#First "Permalink to this formula"/index.html)

Get the first value from a list

List(1, 3, 5, 7, 11, 13).First()

1

Inputs

listA table, column, or list of values

Output

Outputs the first value in list or blank if the list is empty.

ForEach(list, formula)

[Copy link](/content/formulas#ForEach "Permalink to this formula"/index.html)

Run a formula for every item in a list

List("Dog", "Cat").ForEach(Upper(CurrentValue))

[DOG, CAT]

Inputs

listA table, column, or list of valuesformulaA formula to evaluate for each item. Can reference CurrentValue.

Output

Evaluates formula for every value in list and outputs a list of all formula outputs.

FormulaMap(list, formula)

[Copy link](/content/formulas#FormulaMap "Permalink to this formula"/index.html)

Run a formula for every item in a list

List("Dog", "Cat").FormulaMap(Upper(CurrentValue))

[DOG, CAT]

Inputs

listA table, column, or list of valuesformulaA formula to evaluate for each item. Can reference CurrentValue.

Output

Evaluates formula for every value in list and outputs a list of all formula outputs.

In(search, value)

[Copy link](/content/formulas#In "Permalink to this formula"/index.html)

Checks if a value is in a list

In("Dog", "Cat", "Mouse")

False

In("Dog", "Cat", "Mouse", "Dog")

True

Inputs

searchA value to search forvalue...A value or list of values to search in

Output

Outputs True if search is found in value.

Last(list)

[Copy link](/content/formulas#Last "Permalink to this formula"/index.html)

Get the last value from a list

List(1, 3, 5, 7, 11, 13).Last()

13

Inputs

listA table, column, or list of values

Output

Outputs the last value in list or blank if the list is empty.

List(value)

[Copy link](/content/formulas#List "Permalink to this formula"/index.html)

Make a list of values

List(1, 3, 5, 7, 11, 13)

[1,3,5,7,11,13]

List("Dog", "Cat", "Mouse").NTH(2)

"Cat"

Inputs

value...A value or list of values to include in the list

Output

Outputs a list of value(s) or an empty list if no value is provided.

ListCombine(value)

[Copy link](/content/formulas#ListCombine "Permalink to this formula"/index.html)

Merge and flatten lists

ListCombine(List(1, 2, 3), 4, 5, 6)

[1,2,3,4,5,6]

ListCombine(List(1, 2, 3), List(4, 5), 6)

[1,2,3,4,5,6]

Inputs

value...A value or list of values to include in the combined list

Output

Outputs a list of all value(s). Nested lists are flattened in the output.

Nth(list, position)

[Copy link](/content/formulas#Nth "Permalink to this formula"/index.html)

Returns the nth item in a list from the number provided

List(1,3,5,7,11).Nth(1)

1

List("Dog", "Cat", "Mouse").Nth(3)

"Mouse"

Inputs

listA table, column, or list of valuespositionThe position to retrieve a value for. The first item in the list has index 1.

Output

Outputs the value from list at position. Results in an error if position is outside of list.

RandomItem(list, updateContinuously)

[Copy link](/content/formulas#RandomItem "Permalink to this formula"/index.html)

Select a random item from a list

RandomItem(List(1,2,3))

2

Required inputs

listA table, column, or list of values

Optional inputs

updateContinuouslyIf True the output will change on every doc edit. Otherwise, the number will only be generated once. Defaults to True.

Output

Outputs a random item from list. Regenerates on every edit by default.

RandomSample(list, count, withReplacement, updateContinuously)

[Copy link](/content/formulas#RandomSample "Permalink to this formula"/index.html)

Generate a random sample of items from a list

RandomSample(Sequence(1, 10), 3)

[8, 2, 7]

RandomSample(Sequence(1, 10), 5, True)

[9, 2, 3, 6, 2]

Required inputs

listA table, column, or list of valuescountThe number of items to sample. If withReplacement is False, then this may exceed the length of list.

Optional inputs

withReplacementWhether to sample with replacement, where items can appear multiple times in the sample. Defaults to False.updateContinuouslyIf True the output will change on every doc edit. Otherwise, the number will only be generated once. Defaults to True.

Output

Outputs a random sample of count items from list. By default, samples without replacement and regenerates on every edit.

ReverseList(list)

[Copy link](/content/formulas#ReverseList "Permalink to this formula"/index.html)

Reverse the values in a list

List(1, 5, 3, 7, 2).ReverseList()

[2, 7, 3, 5, 1]

Inputs

listA table, column, or list of values

Output

Returns list reversed.

Sequence(start, end, by)

[Copy link](/content/formulas#Sequence "Permalink to this formula"/index.html)

Returns a list of numbers between the provided from and to parameters

Sequence(1, 10)

[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]

Sequence(0, 50, 10)

[0, 10, 20, 30, 40, 50]

Required inputs

startThe number to start fromendThe number to end at

Optional inputs

byThe increment or step between numbers in the sequence. Defaults to 1 or -1 depending on start and end

Output

Outputs a list of numbers from start to end. Step size is controlled via the by input.

Unique(value)

[Copy link](/content/formulas#Unique "Permalink to this formula"/index.html)

Deduplicate values

List("Dog", "Dog", "Cat", "Mouse").Unique()

[Dog, Cat, Mouse]

List(1, 2, 3).Unique()

[1, 2, 3]

Inputs

value...A value to deduplicate

Output

Outputs a list of unique value(s). Deduplicates against each item in a value if it is a list.

Logical

And(value)

[Copy link](/content/formulas#And "Permalink to this formula"/index.html)

Returns true if all the items are true, otherwise false

And(Today() > Date(2015, 4, 23), Bugs.Count() < 5)

true

And(True(), True())

true

And(True(), False())

false

Inputs

value...A value to check

Output

Outputs True if all value(s) are true. Otherwise returns False.

False()

[Copy link](/content/formulas#False "Permalink to this formula"/index.html)

Outputs false

False()

false

Output

Outputs False.

If(condition, ifTrue, ifFalse)

[Copy link](/content/formulas#If "Permalink to this formula"/index.html)

Get a value conditionally (single condition)

If(Today() > Date(2015, 4, 23), "Hello world", "Not true")

Hello world

If(Today() < Date(2015, 4, 23), "Hello world", "Not true")

Not true

Inputs

conditionAn expression that outputs true or falseifTrueA value to output if condition is trueifFalseA value to output if condition is false

Output

Outputs ifTrue if the condition is true. Otherwise outputs ifFalse.

IfBlank(value, ifBlank)

[Copy link](/content/formulas#IfBlank "Permalink to this formula"/index.html)

Get a value with fallback if blank

IfBlank("Hello world", "Alternate text")

Hello world

IfBlank("", "Alternate text")

Alternate text

Inputs

valueThe value to return if not blankifBlankThe value outputted if valueis blank

Output

Outputs ifBlank if value is blank. Otherwise outputs value.

Not(value)

[Copy link](/content/formulas#Not "Permalink to this formula"/index.html)

Negate a true or false value

True().Not()

false

Not(False())

true

Inputs

valueA value to negate

Output

Outputs True if valueis false and False if value is true.

Or(value)

[Copy link](/content/formulas#Or "Permalink to this formula"/index.html)

Check if any input is true

Or(Today() > Date(2015, 4, 23), Bugs.Count() < 5)

true

Or(True(), False())

true

Or(False(), False())

false

Inputs

value...A value to check

Output

Outputs True if any value is true. Otherwise outputs False.

Switch(expression, value, result, arg)

[Copy link](/content/formulas#Switch "Permalink to this formula"/index.html)

Get a value conditionally. Handles multiple conditions

Switch(Year(Today()), 2025, "The past", 2026, "The now", 2027, "The future")

The now

Switch("In progress", "Done", 10, "Open", 1, 5)

5

Inputs

expressionA value or expression to checkvalueCheck if this matches expressionresultIf value matches expression output this valuearg...Any number of value and result pairs followed by an optional default value

Output

Outputs the first result where value matches expression. Outputs an optional final value if no value matches.

SwitchIf(condition, ifTrue, arg)

[Copy link](/content/formulas#SwitchIf "Permalink to this formula"/index.html)

Get a value conditionally. Handles multiple conditions with a fallback

SwitchIf(Today() > Date(2100, 1, 20), "Hello future!", Year(Today()) >= 2000, "Hello present!", "Hello past!")

Hello present!

Inputs

conditionA formula that ouputs true or falseifTrueA value to output if condition is truearg...Any number of condition and ifTrue pairs followed by an optional default value

Output

Outputs the first ifTrue value where condition is true. Outputs the an optional final value if no condition is true.

True()

[Copy link](/content/formulas#True "Permalink to this formula"/index.html)

Outputs true

True()

true

Output

Outputs true.

Math

AbsoluteValue(number)

[Copy link](/content/formulas#AbsoluteValue "Permalink to this formula"/index.html)

Get the absolute value of a number

AbsoluteValue(-14)

14

AbsoluteValue(123)

123

Inputs

numberA number

Output

Outputs number without the sign, so negative numbers become positive in the output.

Average(value)

[Copy link](/content/formulas#Average "Permalink to this formula"/index.html)

Averages a list of numbers ignoring any blank values

Planets.[Number of moons].Average()

25.875

Average(1, 3, 5, 7)

4

Inputs

value...A numeric value or list of numeric values

Output

Outputs the average value. Blank values are ignored. All items in value are averaged if value is a list.

BinomialCoefficient(n, k)

[Copy link](/content/formulas#BinomialCoefficient "Permalink to this formula"/index.html)

Calculates the Binomial Coefficient

BinomialCoefficient(6, 2)

15

Inputs

nThe number of possibilities to choose from. Any non-negative integerkThe number of items to choose. Any non-negative integer less than or equal to n

Output

Outputs the number of ways to choose k items out of n possibilities. In math, the symbols nCk and (n k) can denote a bionmial coefficient, and are sometimes read as "n choose k".

Ceiling(value, factor)

[Copy link](/content/formulas#Ceiling "Permalink to this formula"/index.html)

Rounds a number up to the nearest multiple

Ceiling(3.14, 0.1)

3.2

Ceiling(7, 3)

9

Required inputs

valueA number to round up

Optional inputs

factorA number multiple that value should round up to. Defaults to 1

Output

Outputs value rounded up to the nearest multiple of factor.

Even(value)

[Copy link](/content/formulas#Even "Permalink to this formula"/index.html)

Rounds a number up to the nearest even number

Even(3)

4

Even(2.33)

4

Inputs

valueA number to round

Output

Outputs value rounded up to the nearest even number.

Exponent(value)

[Copy link](/content/formulas#Exponent "Permalink to this formula"/index.html)

Returns Euler's number e (~2.718) raised to a power

Exponent(2)

7.389056099

Inputs

valueA number

Output

Outputs Euler's number for value e (~2.718) raised to a power.

Factorial(value)

[Copy link](/content/formulas#Factorial "Permalink to this formula"/index.html)

Calculates the product of an integer and all the integers below it

Factorial(4)

24

Inputs

valueAn integer number

Output

Outputs the product of an integer value and all the integers below it. If the number if a decimal will only use the initial integer. Note: Inputs greater than 19 may cause precision errors.

Floor(value, factor)

[Copy link](/content/formulas#Floor "Permalink to this formula"/index.html)

Rounds a number down to the nearest multiple

Floor(3.14, 0.1)

3.1

Floor(7, 3)

6

Required inputs

valueA number to round down

Optional inputs

factorA number multiple that value should round up to. Defaults to 1

Output

Outputs value rounded down to the nearest multiple of factor.

IsEven(value)

[Copy link](/content/formulas#IsEven "Permalink to this formula"/index.html)

Checks if a value is even

IsEven(17)

false

IsEven(6)

true

Inputs

valueA value to check

Output

Outputs True if value is even. Otherwise returns False.

IsOdd(value)

[Copy link](/content/formulas#IsOdd "Permalink to this formula"/index.html)

Checks if a value is odd

IsOdd(17)

true

IsOdd(6)

false

Inputs

valueA value to check

Output

Outputs True if value is odd. Otherwise returns False.

Ln(number)

[Copy link](/content/formulas#Ln "Permalink to this formula"/index.html)

Get the natural logarithm of a number. (Base e)

Ln(100)

4.605170186

Inputs

numberA number

Output

Outputs the logarithm of number, base e (Euler's number).

Log(number, base)

[Copy link](/content/formulas#Log "Permalink to this formula"/index.html)

Get the logarithm of a number for a given base

Log(128, 2)

7

Inputs

numberA numberbaseLogarithm base to use

Output

Outputs the logarithm of number to base.

Log10(number)

[Copy link](/content/formulas#Log10 "Permalink to this formula"/index.html)

Get the logarithm of a number (base 10)

Log10(100)

2

Inputs

numberA number

Output

Get the logarithm of number (base 10).

Max(value)

[Copy link](/content/formulas#Max "Permalink to this formula"/index.html)

Get the maximum number or date/time

Max(1, 3, 5, 7, 11)

11

Inputs

value...A numeric value or list of numeric values

Output

Outputs the maximum value. Blank values are ignored. Checks all items in value if value is a list. Use MaxBy instead to get the maximum value by a specific criteria.

Median(value)

[Copy link](/content/formulas#Median "Permalink to this formula"/index.html)

Get the median number or date/time

Median(1, 3, 5, 7, 11)

5

Inputs

value...A numeric value or list of numeric values

Output

Outputs the median value. Blank values are ignored. Checks all items in value if value is a list.

Min(value)

[Copy link](/content/formulas#Min "Permalink to this formula"/index.html)

Gets the minimum number or date/time

Min(1, 3, 5, 7, 11)

1

Inputs

value...A numeric value or list of numeric values

Output

Outputs the minimum value. Blank values are ignored. Checks all items in value if value is a list. Use MinBy instead to get the minimum value by a specific criteria.

Mode(value)

[Copy link](/content/formulas#Mode "Permalink to this formula"/index.html)

Get the most common value

Mode(1, 3, 3, 3, 5, 7)

3

Inputs

value...A value or list of values

Output

Outputs the mode (most frequently occurring) value. Blank values are ignored. Checks all items in value if value is a list.

Odd(value)

[Copy link](/content/formulas#Odd "Permalink to this formula"/index.html)

Rounds a number up to the nearest odd number

Odd(2)

3

Odd(1.23)

3

Inputs

valueA number to round

Output

Outputs value rounded up to the nearest odd number.

Percentile(dataset, percentile)

[Copy link](/content/formulas#Percentile "Permalink to this formula"/index.html)

Get the value at a given percentile of a dataset

Percentile(List(10, 22, 7, 2, 5), 0.5)

7

Percentile(List(4, 2, 10, 6, 8, 12), 0.1)

3

Inputs

datasetA list of numberspercentileThe percentile from dataset to return

Output

Outputs the interpolated value at the given percentile within dataset.

PercentileRank(dataset, value)

[Copy link](/content/formulas#PercentileRank "Permalink to this formula"/index.html)

Get percentile rank of a value in a dataset

PercentileRank(List(10, 22, 7, 2, 5), 7)

0.5

PercentileRank(List(4, 2, 10, 6, 8, 12), 12)

1

Inputs

datasetA list of numbersvalueThe value to find within dataset

Output

Outputs the percentile rank of value within dataset.

Pi()

[Copy link](/content/formulas#Pi "Permalink to this formula"/index.html)

The mathematical π (pi) constant

Pi()

3.141592654

Output

Outputs the mathematical π (pi) constant.

Power(number, exponent)

[Copy link](/content/formulas#Power "Permalink to this formula"/index.html)

Calculates a number raised to a power

Power(2, 3)

8

Power(10, 2)

100

Inputs

numberA number to be raised to a powerexponentThe power to raise number by

Output

Outputs number raised to exponent.

Product(value)

[Copy link](/content/formulas#Product "Permalink to this formula"/index.html)

Multiplies numbers together

Product(3, 5, 2)

30

Inputs

value...A number of list of numbers to multiply

Output

Outputs the mathematical product of all values. Blank values are ignored. Multiplies all items in value if value is a list.

Quotient(dividend, divisor)

[Copy link](/content/formulas#Quotient "Permalink to this formula"/index.html)

Divide one number by another

Quotient(10, 5)

2

Inputs

dividendA number to dividedivisorA number to divide dividend by

Output

Outputs dividend divided by divisor.

Random(updateContinuously)

[Copy link](/content/formulas#Random "Permalink to this formula"/index.html)

Generate a random number

Random()

0.423029953691942

Optional inputs

updateContinuouslyIf True the output will change on every doc edit. Otherwise, the number will only be generated once. Defaults to True.

Output

Outputs a random number between 0 and 1 (including 0, excluding 1). Regenerates on every edit by default.

RandomInteger(low, high, updateContinuously)

[Copy link](/content/formulas#RandomInteger "Permalink to this formula"/index.html)

Generate a random number between two values

RandomInteger(1,10)

7

Required inputs

lowThe smallest number that can be generatedhighThe largest number that can be generated

Optional inputs

updateContinuouslyIf True the output will change on every doc edit. Otherwise, the number will only be generated once. Defaults to True.

Output

Outputs a random number between low and high.

Rank(value, dataset, ascending)

[Copy link](/content/formulas#Rank "Permalink to this formula"/index.html)

Returns the ordered position of a value in a list

Rank(12, List(10, 15, 12, 3, 5, 1))

2

Required inputs

valueThe value to rankdatasetThe list of numbers to sort and then search

Optional inputs

ascendingIf true dataset will be sorted in ascending order, else descending. Defaults to false.

Output

Outputs the position of a value within dataset when sorted.

Remainder(dividend, divisor)

[Copy link](/content/formulas#Remainder "Permalink to this formula"/index.html)

Gets the remainder from dividing two numbers

Remainder(7, 3)

1

Remainder(17, 5)

2

Inputs

dividendA number of dividedivisorA number to divide dividend by

Output

Outputs the remainder when dividend is divided by divisor.

Round(number, places)

[Copy link](/content/formulas#Round "Permalink to this formula"/index.html)

Round a number

Round(3.14159, 2)

3.14

Round(48.111, 0)

48

Required inputs

numberA number to round

Optional inputs

placesThe number of decimal places to round to

Output

Outputs number rounded to the specific number of decimal places.

RoundDown(number, places)

[Copy link](/content/formulas#RoundDown "Permalink to this formula"/index.html)

Round a number down

RoundDown(3.14159, 3)

3.141

RoundDown($48.999, 0)

$48.00

Required inputs

numberA number to round

Optional inputs

placesThe number of decimal places to round to

Output

Outputs number rounded down to the specified number of decimal places.

RoundTo(value, factor)

[Copy link](/content/formulas#RoundTo "Permalink to this formula"/index.html)

Rounds one number to the nearest integer multiple of another

RoundTo(22, 14)

28

RoundTo(8, 5)

10

Inputs

valueA number to roundfactorA numeric multiple that value should round to

Output

Outputs value rounded to the nearest multiple of factor. If no factor is specified rounds to the nearest integer.

RoundUp(number, places)

[Copy link](/content/formulas#RoundUp "Permalink to this formula"/index.html)

Round a number up

RoundUp(3.14159, 2)

3.15

RoundUp($48.01, 0)

$49.00

Required inputs

numberA number to round

Optional inputs

placesThe number of decimal places to round to

Output

Outputs number rounded up to the specified number of decimal places.

Sign(number)

[Copy link](/content/formulas#Sign "Permalink to this formula"/index.html)

Get the sign of a number

Sign(13)

1

Sign(-4)

-1

Inputs

numberA number

Output

Outputs -1 if number is negative, 0 if number is zero, or 1 if number is positive.

SquareRoot(number)

[Copy link](/content/formulas#SquareRoot "Permalink to this formula"/index.html)

Calculates the square root of a number

SquareRoot(64)

8

Inputs

numberA number

Output

Outputs the square root of number.

StandardDeviation(value)

[Copy link](/content/formulas#StandardDeviation "Permalink to this formula"/index.html)

Estimates the standard deviation of a population based on a sample of values

StandardDeviation(1, 3, 5, 7, 11)

3.847076812334269

Inputs

value...A number or list of numbers

Output

Outputs the estimated standard deviation based on the sample in values. Blank values are ignored. All items in value are considered if value is a list.

StandardDeviationPopulation(value)

[Copy link](/content/formulas#StandardDeviationPopulation "Permalink to this formula"/index.html)

Calculates the standard deviation based on an entire population

StandardDeviationPopulation(1, 3, 5, 7, 11)

3.4409301068170506

Inputs

value...A number or list of numbers

Output

Outputs the standard deviation based on values that make up the entire population. Blank values are ignored. All items in value are considered if value is a list.

Sum(value)

[Copy link](/content/formulas#Sum "Permalink to this formula"/index.html)

Adds numbers together

Sum(1, 2, 3, 4)

10

Inputs

value...A number or list of numbers to sum

Output

Outputs the mathematical sum of all values. Blank values are ignored. Sum all items in value if value is a list.

SumProduct(list1, list2)

[Copy link](/content/formulas#SumProduct "Permalink to this formula"/index.html)

Calculates the total from multiplying two lists

SumProduct(List(1, 2), List(3, 4))

11

Inputs

list1A list of numberslist2An equally sized list of numbers

Output

Outputs the total sum of the products of list1 and list2. Each list must be of equal size.

Truncate(number, places)

[Copy link](/content/formulas#Truncate "Permalink to this formula"/index.html)

Truncates a number

Truncate(3.14159, 4)

3.1415

Required inputs

numberA number

Optional inputs

placesThe number of decimal places to truncate at

Output

Outputs number truncated to places.

Misc

DocId(url)

[Copy link](/content/formulas#DocId "Permalink to this formula"/index.html)

Gets the document ID from a Coda doc URL.

DocId("https://coda.io/d/My-Doc_dAbCdEfGhIj")

AbCdEfGhIj

Inputs

urlA Coda URL

Output

Outputs the document ID from the given url.

ObjectLink(object, displayText)

[Copy link](/content/formulas#ObjectLink "Permalink to this formula"/index.html)

Get the url for an object

thisDocument.ObjectLink()

https://coda.io/d/\_d\[your doc here]

Required inputs

objectA Coda object. This includes tables, views, rows, and docs.

Optional inputs

displayTextDisplay Text to give to the URL object.

Output

Outputs a URL for object.

PageName(object)

[Copy link](/content/formulas#PageName "Permalink to this formula"/index.html)

Get the name of the page an object belongs to

thisTable.PageName()

[Current page name]

Inputs

objectA Coda object. This includes pages, tables, views, controls, and canvas formulas.

Output

Outputs the name of the page that object belongs to.

ParseCSV(csvString, delimiter)

[Copy link](/content/formulas#ParseCSV "Permalink to this formula"/index.html)

Converts a CSV to list

ParseCSV("Hello,World,!", ",")

["Hello", "World", "!"]

ParseCSV("I'm a TSV", Character(9))

["I'm", "a", "TSV"]

Required inputs

csvStringA delimited string value.

Optional inputs

delimiterThe delimiter to use. Defaults to ","

Output

Outputs a list of items by parsing a csvString delimited by a delimiter. The delimiter can be changed to work with other formats like TSV. You can also use our CSV importer for one-off imports.

SwapDocIdInUrl(url, docId)

[Copy link](/content/formulas#SwapDocIdInUrl "Permalink to this formula"/index.html)

Updates a Coda doc URL to point to a new doc id.

SwapDocIdInUrl("https://coda.io/d/My-Doc_dABCDEFG", "1234567")

https://coda.io/d/My-Doc\_d1234567

Inputs

urlA Coda URLdocIdThe new document ID

Output

Outputs the updated URL.

Object

ParseJSON(jsonString, path)

[Copy link](/content/formulas#ParseJSON "Permalink to this formula"/index.html)

Parses a JSON string

ParseJSON('{"name": "Mike", "location": "New York"}', "$.name")

Mike

Required inputs

jsonStringA JSON string. For example: '{"name": "Bob", "age": 42}'

Optional inputs

pathA path within the JSON; for example, "$.pull_request.state".See https://goessner.net/articles/JsonPath/ for details.

Output

Outputs the value parsed from jsonString at path. If path is not specified, outputs the entire parsed value.

People

CreatedBy(object)

[Copy link](/content/formulas#CreatedBy "Permalink to this formula"/index.html)

Get the creator for a row or other object

thisRow.CreatedBy()

@John Doe

Inputs

objectA Coda object. This includes tables, views, columns, rows, and docs.

Output

Outputs the user who created object.

IsSignedIn()

[Copy link](/content/formulas#IsSignedIn "Permalink to this formula"/index.html)

Checks if the current user is logged in

Output

Outputs True if the current user is logged in. Otherwise, outputs False.

ModifiedBy(object)

[Copy link](/content/formulas#ModifiedBy "Permalink to this formula"/index.html)

Returns the user who modified the previous item

thisRow.ModifiedBy()

@John Doe

Inputs

objectA Coda object. This includes tables, views, columns, rows, and docs.

Output

Outputs the user who modified object most recently.

User()

[Copy link](/content/formulas#User "Permalink to this formula"/index.html)

Get the current logged in user

User()

@John Doe

Output

Outputs the current user. Will be different for every user. Note: \* User().email returns the current user emails \* User().name returns the current users name *User().photo returns the current users photo *User().state returns the current users doc access (e.g. write access).

Relational

Let(value, name, expression)

[Copy link](/content/formulas#Let "Permalink to this formula"/index.html)

Names a value so you can refer to it inside an expression. Useful if you want to use a value multiple times (i.e., as a local variable) or give it a clearer name. If you have a nested formula with an inner and outer CurrentValue, you can give each of them distinct names

Let(Tasks.Count(), n, If(n > 0, n, "Done!"))

5

List(1, 2, 3, 4).Filter(CurrentValue.Let(n, n > 1 and n < 4))

[2, 3]

Inputs

valueThe value you want to renamenameA shorter name you can use to refer to value. Enter the name without quotesexpressionAny formula. Inside this formula, you can use name to reference value

Output

Outputs the result of expression.

RowId(row)

[Copy link](/content/formulas#RowId "Permalink to this formula"/index.html)

A unique ID for a row

thisRow.RowId()

14

Inputs

rowA row in a table

Output

Outputs a unique ID for row.

WithName(value, name, expression)

[Copy link](/content/formulas#WithName "Permalink to this formula"/index.html)

WithName(Tasks.Count(), n, If(n > 0, n, "Done!"))

5

List(1, 2, 3, 4).Filter(CurrentValue.WithName(n, n > 1 and n < 4))

[2, 3]

Inputs

Output

Outputs the result of expression.

RichText

BulletedList(value)

[Copy link](/content/formulas#BulletedList "Permalink to this formula"/index.html)

Create a bulleted list of values

BulletedList("Dog", "Cat", "Mouse")

• Dog • Cat • Mouse

Inputs

value...A value or list of values

Output

Outputs a bulleted list of given value(s).

IndentBy(text, levels)

[Copy link](/content/formulas#IndentBy "Permalink to this formula"/index.html)

Change the relative indent of content

IndentBy("Foo", 1)

Foo

Inputs

textA text valuelevelsThe number of levels to indent by. Can be positive or negative.

Output

Outputs text with indent adjusted by levels.

NumberedList(value)

[Copy link](/content/formulas#NumberedList "Permalink to this formula"/index.html)

Create a numbered list of values

NumberedList("Dog", "Cat", "Mouse")

1. Dog 2. Cat 3. Mouse

Inputs

value...A value or list of values

Output

Outputs a numbered list of given value(s).

Shape

ClipCircle(image)

[Copy link](/content/formulas#ClipCircle "Permalink to this formula"/index.html)

Crops an image into a circle

ClipCircle(Image("https://pbs.twimg.com/profile_images/671865418701606912/HECw8AzK.jpg"))

Inputs

imageAn image to crop

Output

Outputs a cropped circular image.

Embed(url, width, height, force)

[Copy link](/content/formulas#Embed "Permalink to this formula"/index.html)

Get an HTML embed for a URL

Embed("https://www.youtube.com/watch?v=dQw4w9WgXcQ")

Embed("https://www.theverge.com/2017/10/19/16497444/coda-spreadsheet-krypton-shishir-mehrotra", 400, 500)

Required inputs

urlThe URL or web address to display

Optional inputs

widthHow wide to render the embed. Use 0 for default.heightHow tall to render the embed. Use 0 for default.forceLoad the URL directly in your browser using compatibility mode. Used for pages with sign ins.

Output

Outputs an HTML embed for url with the specified width and height.

Hyperlink(url, displayValue)

[Copy link](/content/formulas#Hyperlink "Permalink to this formula"/index.html)

Create a link

Hyperlink("www.google.com", "Google")

Google

Required inputs

urlThe URL or web address to link to

Optional inputs

displayValueThe text to show

Output

Outputs a link that shows the given displayValue and navigates to url.

HyperlinkCard(url)

[Copy link](/content/formulas#HyperlinkCard "Permalink to this formula"/index.html)

Creates rich url card

HyperlinkCard("cnn.com")

Inputs

urlThe URL or web address to display

Output

Outputs a card for the given url.

Image(url, width, height, name, style, outline)

[Copy link](/content/formulas#Image "Permalink to this formula"/index.html)

Gets an image for a URL

Image("https://pbs.twimg.com/profile_images/671865418701606912/HECw8AzK.jpg")

Required inputs

urlThe URL of an image. Includes GIF, PNG, and JPG

Optional inputs

widthHow wide to render the image. Use 0 for default.heightHow tall to render the image. Use 0 for default.nameAlternative text of the imagestyleOne of auto or circleoutlineWhether or not to render outline around image. Defaults to true.

Output

Outputs an image for url with the specified width, height, name, style, and outline.

Rectangle(width, height, color, name)

[Copy link](/content/formulas#Rectangle "Permalink to this formula"/index.html)

Generates a rectangle

Rectangle(200, 20, "#007AF5")

Required inputs

widthHow wide to render the rectangle.

Optional inputs

heightHow tall to render the rectangle. Use 0 for default.colorColor as RGB hex #RRGGBB (black if omitted)nameAlternative text of the image

Output

Outputs a rectangle with specified width, height, color, and name.

Spatial

Distance(location1, location2, unit)

[Copy link](/content/formulas#Distance "Permalink to this formula"/index.html)

Returns the distance (in kilometers) between two locations (lat/long) on earth using the Haversine formula

Distance(Location(33.9206418,-118.3303341), Location(37.4274787, -122.1719077))

521.8529425485297

Required inputs

location1Coordinates of lat and long. Use Location()location2Coordinates of lat and long. Use Location()

Optional inputs

unit"M"iles, "N"autical miles or "K"ilometers. Defaults to "K"ilometers if not specified

Output

Outputs the distance in specified unit between location1 and location2 using the Haversine formula.

Location(latitude, longitude, altitude, heading, speed, accuracy, altitudeAccuracy)

[Copy link](/content/formulas#Location "Permalink to this formula"/index.html)

Get location for the provided lat-long

Location(33.9206418,-118.3303341)

[33.9206418,-118.3303341, , ]

Required inputs

latitudePosition in decimal degreeslongitudePosition in decimal degrees

Optional inputs

altitudeAltitude relative to sea levelheadingDirection of travel in degreesspeedMeters per secondaccuracyaccuracy of latitude and longitude in metersaltitudeAccuracyaccuracy of altitude in meters

Output

Outputs a single location object using latitude and longitude. Can also optionally include altitude, heading, speed, accuracy, and altitudeAccuracy. Useful with Distance().

String

Character(charNumber)

[Copy link](/content/formulas#Character "Permalink to this formula"/index.html)

Create a unicode character (symbol)

Concatenate(Character(191), "Que Pasa?")

¿Que pasa?

Concatenate(Character(34), "Keep me in quotes", Char(34))

"Keep me in quotes"

Inputs

charNumberA number that matches a unicode value

Output

Outputs a single unicode character matching the charNumber given. https://en.wikipedia.org/wiki/List\_of\_Unicode\_characters.

Concatenate(text)

[Copy link](/content/formulas#Concatenate "Permalink to this formula"/index.html)

Combine multiple text values

Concatenate("Notes for", Today())

Notes for 3/8/2017

Inputs

text...Any text value. Includes text, numbers, and dates

Output

Outputs the combined text of all text values as a single text value.

ContainsText(text, searchText, ignoreCase, ignoreAccents, ignorePunctuation)

[Copy link](/content/formulas#ContainsText "Permalink to this formula"/index.html)

Check if one text contains another.

ContainsText("a needle in the haystack", "needle")

true

ContainsText("Trippers and askers surround me", "trip")

false

ContainsText("But they are not the Me myself", "me", true)

true

ContainsText("crème fraîche", "creme", false, true)

true

Required inputs

textThe text value to search in.searchTextA text value to search for.

Optional inputs

ignoreCaseWhether to ignore case when searching. Defaults to false.ignoreAccentsWhether to ignore diacritics (accents, umlauts, cedillas, etc.) when checking. Defaults to false.ignorePunctuationWhether to ignore punctuation when (quotes, commas, periods, etc.) when searching. Defaults to false.

Output

Outputs True if text contains searchText.

DecodeFromBase64(base64Text)

[Copy link](/content/formulas#DecodeFromBase64 "Permalink to this formula"/index.html)

Decodes base64 encoded text

DecodeFromBase64("VGhlIHF1aWNrIC8gQnJvd24gZm94Pw")

The quick / Brown fox?

Inputs

base64TextThe base64 encoded text

Output

Outputs base64Text as a string.

EncodeAsBase64(text)

[Copy link](/content/formulas#EncodeAsBase64 "Permalink to this formula"/index.html)

Encodes text as base64

EncodeAsBase64("The quick / Brown fox?")

VGhlIHF1aWNrIC8gQnJvd24gZm94Pw==

Inputs

textThe text to base64 encode

Output

Outputs text base64 encoded.

EncodeForUrl(text)

[Copy link](/content/formulas#EncodeForUrl "Permalink to this formula"/index.html)

Encodes text use in a URL

EncodeForUrl("The quick / Brown fox?")

The%20quick%20%2F%20Brown%20fox%3F

Inputs

textThe text to encode

Output

Outputs text formatted so it can be used in the query string of a URL.

EndsWith(text, suffix, ignoreCase, ignoreAccents)

[Copy link](/content/formulas#EndsWith "Permalink to this formula"/index.html)

Check if text ends with a suffix

EndsWith("Hello world", "Find me")

false

EndsWith("Hello world", "world")

true

EndsWith("Hello World", "world", true)

true

EndsWith("Hej världen", "varlden", false, true)

true

Required inputs

textThe text to checksuffixThe ending sub-text to check for

Optional inputs

ignoreCaseWhether to ignore case when checking. Defaults to false.ignoreAccentsWhether to ignore diacritics (accents, umlauts, cedillas, etc.) when checking. Defaults to false.

Output

Outputs True if text ends with suffix. Otherwise outputs False.

Format(template, text)

[Copy link](/content/formulas#Format "Permalink to this formula"/index.html)

Substitute values into a text template

Format("This is my {1} and it is {2}", "doc", "great")

This is my doc and it is great

Format("{1:0000}-{2:00}-{3:00}", Today().Year(), Today().Month(), Today().Day())

2018-06-05

Inputs

templateA text value. To substitute a value, use {X} or {X:Y}. X is the nth argument after the format string. The Y part is optional. It determines how to pad the string if the value is not as long as Y.text...The text to insert at {X}. The first will insert at {1}, the second at {2} and so on

Output

Outputs text with all {X} values in template replaced with the matching text.

Join(delimiter, text)

[Copy link](/content/formulas#Join "Permalink to this formula"/index.html)

Combine multiple text values with a delimiter

Join("-", "This", "is", "Awesome")

This-is-Awesome

Inputs

delimiterA text value to use as a delimitertext...Text or list of text values

Output

Outputs text combining all text(s) with delimiter in-between every item.

Left(text, numberOfCharacters)

[Copy link](/content/formulas#Left "Permalink to this formula"/index.html)

Extract starting characters from text

Left("Hello world", 3)

Hel

Inputs

textThe text to extract a prefix fromnumberOfCharactersThe number of characters to output

Output

Outputs the starting numberOfCharacters from text.

LeftPad(text, targetLength, padString)

[Copy link](/content/formulas#LeftPad "Permalink to this formula"/index.html)

Pad text from the left

LeftPad("10", 3)

10

LeftPad("99", 5, "0")

00099

LeftPad("foo", 1)

foo

Required inputs

textThe value to pad the start oftargetLengthThe length of the resulting string once the current string has been padded. If the value is lower than the current string's length, the current string will be returned as is.

Optional inputs

padStringThe text to pad text with. Defaults to " " (space)

Output

Outputs text padded with padString at the start so that the resulting text has the given targetLength.

Length(text)

[Copy link](/content/formulas#Length "Permalink to this formula"/index.html)

Returns length of the given text

Length("Hello world")

11

Inputs

textA text value

Output

Outputs the number of characters in text.

LineBreak(softLineBreak)

[Copy link](/content/formulas#LineBreak "Permalink to this formula"/index.html)

Returns a line break

Concatenate("First", LineBreak(), "Second")

First Second

Optional inputs

softLineBreakWhether to create a soft line break without additional spacing. Defaults to false.

Output

Outputs a line break.

Lower(text)

[Copy link](/content/formulas#Lower "Permalink to this formula"/index.html)

Convert text to lower case

Lower("Hello WORLD")

hello world

Inputs

textA text value

Output

Outputs text with all characters made lower case.

Middle(text, start, numberOfCharacters)

[Copy link](/content/formulas#Middle "Permalink to this formula"/index.html)

Extract characters from the middle of text

Middle("Hello world", 3, 5)

llo w

Inputs

textA text valuestartThe character position to start from. Starts at 1numberOfCharactersThe number of characters to extract

Output

Outputs numberOfCharacters from textstarting at position.

RegexExtract(text, regularExpression, regexFlags)

[Copy link](/content/formulas#RegexExtract "Permalink to this formula"/index.html)

Return the parts of text that match a regular expression

Required inputs

textA text valueregularExpressionA Javascript regular expression. See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular\_Expressions#Using\_special\_characters for documentation and test expressions at https://www.regextester.com

Optional inputs

regexFlagsFlags to use with regularExpression. See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular\_Expressions#Advanced\_searching\_with\_flags\_2

Output

Outputs the portions of text that match regularExpression

RegexMatch(text, regularExpression)

[Copy link](/content/formulas#RegexMatch "Permalink to this formula"/index.html)

Check if text matches a regular expression

RegexMatch("Top Floor Pacific Heights Flat w/Parking (marina / cow hollow) $1200 1bd 800ft", "([$]\d+)")

true

Inputs

Output

Outputs True if text matches regularExpression.

RegexReplace(text, regularExpression, replacementText)

[Copy link](/content/formulas#RegexReplace "Permalink to this formula"/index.html)

Substitute regular expression matches

RegexReplace("Top Flat w/Parking (marina / cow hollow) $1200 1bd 800ft", "([$]\d+)", "$2000")

Top Flat w/Parking (marina / cow hollow) $2000 1bd 800ft

Inputs

textA text valueregularExpressionA Javascript regular expression. See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular\_Expressions#Using\_special\_characters for documentation and test expressions at https://www.regextester.comreplacementTextText to substitute

Output

Outputs text with all regularExpression matches replaced with replacementText.

Repeat(text, repetitions)

[Copy link](/content/formulas#Repeat "Permalink to this formula"/index.html)

Repeats text multiple times

Repeat("ha", 4)

hahahaha

Inputs

textThe text to repeatrepetitionsHow many times to repeat text

Output

Outputs text based on repeating text by the number of repetitions specified.

Replace(text, start, numberOfCharacters, replacementText)

[Copy link](/content/formulas#Replace "Permalink to this formula"/index.html)

Replace a range within text

Replace("Spreadsheets", 1, 6, "Bed")

Bedsheets

Inputs

textA text valuestartThe character position to start from. Starts at 1numberOfCharactersThe number of characters to removereplacementTextText to substitute

Output

Outputs text with numberOfCharacters removed starting at and replaced with replacementText.

Right(text, numberOfCharacters)

[Copy link](/content/formulas#Right "Permalink to this formula"/index.html)

Extract ending characters from text

Right("Hello world", 3)

rld

Inputs

textThe text to extract a suffix fromnumberOfCharactersThe number of characters to output

Output

Outputs ending characters of text.

RightPad(text, targetLength, padText)

[Copy link](/content/formulas#RightPad "Permalink to this formula"/index.html)

Pad text from the right

RightPad("10", 3)

10

RightPad("99", 5, "0")

99000

RightPad("foo", 1)

foo

Required inputs

textThe value to pad the start oftargetLengthThe length of the resulting text once text has been padded. If the value is lower than the current text's length, then text will be returned as is.

Optional inputs

padTextThe string to pad text with. Defaults to " " (space)

Output

Outputs text padded with padText at the end so that the resulting text has the given targetLength.

Split(text, delimiter)

[Copy link](/content/formulas#Split "Permalink to this formula"/index.html)

Split text on a delimiter

Split("I-need-these-apart-3/10/2017", "-")

[I, need, these, apart, 3/10/2017]

Inputs

textA text value to split updelimiterThe character to split on. Use LineBreak() to split each line

Output

Outputs a list generated from splitting text by the delimiter character.

StartsWith(text, prefix, ignoreCase, ignoreAccents)

[Copy link](/content/formulas#StartsWith "Permalink to this formula"/index.html)

Check if text starts with specified characters

StartsWith("Hello world", "Find me")

false

StartsWith("Hello world", "Hello")

true

StartsWith("Hello world", "hello", true)

true

StartsWith("Hej världen", "Hej var", false, true)

true

Required inputs

textThe text to check.prefixThe prefix to check for.

Optional inputs

Output

Outputs True if text starts with prefix. Otherwise outputs False.

Substitute(text, searchFor, replacementText)

[Copy link](/content/formulas#Substitute "Permalink to this formula"/index.html)

Replace the first matching substring in some text

Substitute("Hello world", "Hello", "Good morning")

Good morning world

Substitute("ho ho ho", "ho", "yo")

yo ho ho

Inputs

textA text valuesearchForThe text value to search forreplacementTextText to substitute

Output

Outputs text with the first searchFor match replaced with replacementText.

SubstituteAll(text, searchFor, replacementText)

[Copy link](/content/formulas#SubstituteAll "Permalink to this formula"/index.html)

Replace all matching substrings in some text

SubstituteAll("The Cat in the Hat", "at", "orn")

The Corn in the Horn

Inputs

textA text valuesearchForThe text value to search forreplacementTextText to substitute

Output

Outputs text with all searchFor matches replaced with replacementText.

ToByteSize(byteCount, base)

[Copy link](/content/formulas#ToByteSize "Permalink to this formula"/index.html)

Pretty-print a byte count (KB, MB, GB, etc.)

ToByteSize(265318)

265.32 kB

ToByteSize(265318, 2)

259.1 KB

Required inputs

byteCountA number of bytes

Optional inputs

baseconversion base, 2 or 10 (default)

Output

Outputs a text rendering of byteCount (KB, MB, GB, etc.).

ToHexadecimal(decimalNumber, targetLength)

[Copy link](/content/formulas#ToHexadecimal "Permalink to this formula"/index.html)

Convert a number to a hexadecimal string

ToHexadecimal(10)

A

ToHexadecimal(10, 4)

000A

Required inputs

decimalNumberA decimal number

Optional inputs

targetLengthThe target length

Output

Outputs a text of decimalNumber converted to hexadecimal. Left-pads result with 0's to satisfy targetLength if specified.

Trim(text)

[Copy link](/content/formulas#Trim "Permalink to this formula"/index.html)

Trim starting and ending spaces from text

Trim(" loooking good! ")

looking good!

Trim("Stay positive ")

Stay positive

Inputs

textA text value

Output

Outputs text with all of the leading and trailing spaces removed.

Upper(text)

[Copy link](/content/formulas#Upper "Permalink to this formula"/index.html)

Convert text to upper case

Upper("hello")

HELLO

Inputs

textA text value

Output

Outputs text with all characters made upper case.

Actions

Activate(object)

[Copy link](/content/formulas#Activate "Permalink to this formula"/index.html)

Places the cursor on the given object

Activate(Tasks.first())

An action which when triggered will bring up the row input form for the specified row.

Inputs

objectA Coda object. This includes table, views, columns, rows, and docs

Output

Outputs an action which (when run) will place the cursor on object.

AddOrModifyRows(table, expression, column, columnValue)

[Copy link](/content/formulas#AddOrModifyRows "Permalink to this formula"/index.html)

Modify matching rows or add one if none match

AddOrModifyRows(Tasks, Status = "Open", Description, "Send out metrics")

An action which when triggered will add a row to Tasks table and set the Description column to "Send out metrics" if there are no rows that have status set to "Open". If it finds matching rows, will update the Description in all rows to "Send out metrics".

Inputs

tableThe table to modifyexpressionFilter to rows you want to modifycolumn...The column to populatecolumnValue...The value to set in column

Output

Outputs an action which (when run) will modify all rows in table matching expression with specified columnValue(s). If no rows match, will add a new row.

AddRow(table, column, columnValue)

[Copy link](/content/formulas#AddRow "Permalink to this formula"/index.html)

Add a row to the table

AddRow(Tasks, Description, "Send out metrics")

An action which when triggered will add a row to Tasks table and set the Description column to "Send out metrics".

Inputs

tableThe table to modifycolumn...The column to populatecolumnValue...The value to set in column

Output

Outputs an action which (when run) will add a new row to table and update the specified column(s) with columnValue(s).

CopyDoc(title, url, folder)

[Copy link](/content/formulas#CopyDoc "Permalink to this formula"/index.html)

Copy a document to your document list

CopyDoc()

An action which when triggered will copy this document.

CopyDoc('newTitle')

An action which when triggered will copy this document, and rename it 'newTitle'.

CopyDoc('newTitle', 'https://coda.io/d/My-Doc_dQw4t2TMcVQ/')

An action which when triggered will copy the document at the url, and rename it 'newTitle'.

CopyDoc('newTitle', 'https://coda.io/d/My-Doc_dQw4t2TMcVQ/', 'fl-123345')

An action which when triggered will copy the document at the url, and rename it 'newTitle', and pre-select the folder to copy to.

CopyDoc('newTitle', 'https://coda.io/d/My-Doc_dQw4t2TMcVQ/', 'https://coda.io/folders/fl-123345')

An action which when triggered will copy the document at the url, and rename it 'newTitle', and pre-select the folder to copy to.

CopyDoc('newTitle', 'fl-123345')

An action which when triggered will copy this document, and rename it 'newTitle', and pre-select the folder to copy to.'

CopyDoc('newTitle', 'https://coda.io/folders/fl-123345')

An action which when triggered will copy this document, and rename it 'newTitle', and pre-select the folder to copy to.

Optional inputs

titleThe title of the new doc (optional).urlThe url of the doc to copy (optional)folderThe id or url of the folder to copy the doc to (optional)

Output

Outputs an action which (when run) will copy this or another document.

CopyPageToDoc(page)

[Copy link](/content/formulas#CopyPageToDoc "Permalink to this formula"/index.html)

Copies the current page to a new doc or to another doc

CopyPageToDoc()

Copies the current page to a new doc or to another doc

Optional inputs

pageThe page that will be copied

Output

An action which when triggered will copy the current page.

CopyToClipboard(content)

[Copy link](/content/formulas#CopyToClipboard "Permalink to this formula"/index.html)

Copy content to your clipboard

CopyToClipboard("https://google.com")

An action which when triggered will copy "https://google.com" to the user's clipboard.

Inputs

contentThe content to copy to the clipboard

Output

Outputs an action which (when run) will copy content to your clipboard. Rich text formatting will not be preserved.

DeleteRows(rows)

[Copy link](/content/formulas#DeleteRows "Permalink to this formula"/index.html)

Deletes specified rows

DeleteRows(Tasks.filter(Status != "Done"))

An action which when triggered will delete all rows returned by the filter.

Inputs

rowsA list of rows to delete

Output

Outputs an action which (when run) will delete each row in rows.

DuplicatePage(page, name, parentPage, copySubpages, duplicateOptions, rowOptions, makeVisible)

[Copy link](/content/formulas#DuplicatePage "Permalink to this formula"/index.html)

Duplicates a page

DuplicatePage([Topic template], 'Launch discussions', [Parent page], true, 'CreateViews')

An action which when triggered will create a new page named "Launch discussions" by duplicating the page named "Topic template". The new page will be created under the "Parent page", have its subpages copied, and have views created for existing tables.

Required inputs

pageThe page that will be duplicated.

Optional inputs

nameName for the new page.parentPageThe page to create the new page under. Defaults to the parent of page .copySubpagesWhether to copy all subpages of page. Defaults to false.duplicateOptionsBehavior when the page has tables and views. If set to "CreateViews", edits to data in the new page will show up in the original tables too. If set to "DuplicateData", edits to data in the new page won't affect the rest of your doc. If set to "DuplicateTables", edits to views in the new page will show up in the original table, and other edits won't affect the rest of your doc. Defaults to "CreateViews".rowOptionsThis parameter is used to specify which rows should be included. It should be one of - All, Visible, None. If set to `All`, all rows including those hidden by a view will be included. If set to `Visible`, only visible rows will be included. If set to `None`, none of the rows will be included. This option is only used if duplicateOptions is not "CreateViews".makeVisibleIf set to True all added pages will be forced visible. Otherwise added pages will inherit the visibility of their source page.

Output

Outputs an action (when run) which will create a duplicate page of page with the given name.

DuplicateRows(rows, column, columnValue)

[Copy link](/content/formulas#DuplicateRows "Permalink to this formula"/index.html)

Duplicates one or more rows

DuplicateRows(thisRow, Status, "Done")

An action which, when triggered, will duplicate thisRow and update the Status column to "Done."

Inputs

rowsThe rows in a table to duplicatecolumn...The column to modifycolumnValue...The value to set in column

Output

Outputs an action value which (when run) will duplicate the target rows and modify the specified column(s) with columnValue.

ExportCSV(table, filename)

[Copy link](/content/formulas#ExportCSV "Permalink to this formula"/index.html)

Export a table or view as a CSV file

ExportCSV(Tasks)

An action which when triggered will export the Tasks table as CSV.

ExportCSV(Tasks, "my-tasks-export")

An action which when triggered will export Tasks table as "my-tasks-export.csv".

ExportCSV([Done Tasks])

An action which when triggered will export the filtered [Done Tasks] view as CSV.

Required inputs

tableThe table or view to export as CSV

Optional inputs

filenameCustom filename for the exported CSV (optional)

Output

Outputs an action which (when run) will export the specified table/view as CSV.

ModifyRows(rows, column, columnValue)

[Copy link](/content/formulas#ModifyRows "Permalink to this formula"/index.html)

Modify values in one or more rows

ModifyRows(Tasks.filter(Status != "Done"), Status, "Done")

An action which when triggered will update the Status column in all rows returned by the filter to Done.

Inputs

rowsThe rows in a table to modifycolumn...The column to modifycolumnValue...The value to set in column

Output

Outputs an action value which (when run) will modify the specified column(s) with columnValue(s) for each row in rows.

NoAction()

[Copy link](/content/formulas#NoAction "Permalink to this formula"/index.html)

Does nothing.

If(HasCheckedAgreement, CopyDoc(), NoAction())

If HasCheckedAgreement is true, the doc will be copied. Otherwise no action will be taken.

Output

Outputs an action which (when run) does nothing.

Notify(people, message)

[Copy link](/content/formulas#Notify "Permalink to this formula"/index.html)

Notify doc users

Notify([Owner], "Hey [Owner], can you update your status?"

A notification will be created against the person(s) within [Owner] stating the text

Inputs

peopleThe person or list of people to notifymessageThe message to send

Output

Outputs an action which (when run) will send message to people via an email and in-app notification.

OnActionError(action, actionOnError)

[Copy link](/content/formulas#OnActionError "Permalink to this formula"/index.html)

Runs a main action first and then runs a secondary action only if an error was detected

OnActionError(Notify(Person, Message), NoAction())

An action that tries to send a notification and skips any failures in an iteration by taking no action on error.

OnActionError(Notify(Person, Message), AddRow(Errors, Description, Concatenate("Action on table [Tasks] for row: ", thisRow.Name, " has failed.")))

An action that tries to send a notification and logs an entry to the Errors table when an error occurs.

OnActionError(Notify(Person, Message), RunActions(thisRow.ErrorAction))

An action that tries to send a notification and runs the action configured in another column when an error occurs.

Inputs

actionThe main action to runactionOnErrorThe action to run if an error occurs from the main action

Output

Outputs an action which (when run) will run action. actionOnError will run if there was an error detected with action.

OpenRow(row, viewOrLayout, viewMode)

[Copy link](/content/formulas#OpenRow "Permalink to this formula"/index.html)

Opens the row

OpenRow(Tasks.first(), View, "Fullscreen")

An action which when triggered will bring up the row from the view specified.

Required inputs

rowThe row to open

Optional inputs

viewOrLayoutThe view to use to open the rowviewModeThe view mode to use for the opened row (modal, fullscreen, center, or right)

Output

Outputs an action which (when run) will open the row.

OpenWindow(url)

[Copy link](/content/formulas#OpenWindow "Permalink to this formula"/index.html)

Open a link in a new tab

OpenWindow("https://www.google.com")

An action which when triggered will open a new window with the specified input.

Inputs

urlThe web address to open

Output

Outputs an action which (when run) will open url in a new browser tab.

RefreshAssistant(references)

[Copy link](/content/formulas#RefreshAssistant "Permalink to this formula"/index.html)

Refresh assistant related things

RefreshAssistant(AiBlock)

The AiBlock will be refreshed.

Inputs

references...The column or block to refresh

Output

Outputs an action which (when run) refreshes assistant data in references(s).

RefreshColumn(column)

[Copy link](/content/formulas#RefreshColumn "Permalink to this formula"/index.html)

Refresh Pack columns

Refresh(PR)

The PR column will be refreshed.

Inputs

column...The column to refresh

Output

Outputs an action which (when run) refreshes Pack data in column(s).

RefreshTable(tableRef)

[Copy link](/content/formulas#RefreshTable "Permalink to this formula"/index.html)

Refreshes the given Pack table. This is not supported in automations.

RefreshTable(Events)

The Events table will be refreshed.

Inputs

tableRefPack table

Output

Outputs an action which (when run) queues up a sync of the given table. Subsequent actions may complete before the sync starts, but syncs in the queue are processed sequentially.

ResetControlValue(control)

[Copy link](/content/formulas#ResetControlValue "Permalink to this formula"/index.html)

Resets the value of a control

ResetControlValue(PersonalTextbox)

An action which when triggered will reset the PersonalTextbox control value to the default value.

ResetControlValue(CollaborativeTextbox)

An action which when triggered will clear the CollaborativeTextbox control value.

ResetControlValue(CollaborativeCheckbox)

An action which when triggered will set the CollaborativeCheckbox control value to false.

Inputs

controlThe control to reset

Output

Outputs an action value which (when run) will reset the value of control.

RunActions(action)

[Copy link](/content/formulas#RunActions "Permalink to this formula"/index.html)

Run one or more actions

RunActions(Tasks.CloseBugs)

An action which when triggered will click all buttons in the CloseBugs column.

Inputs

action...The action to run

Output

Outputs an action which (when run) will run all provided action(s).

SetControlValue(control, value)

[Copy link](/content/formulas#SetControlValue "Permalink to this formula"/index.html)

Set the value of a control

SetControlValue(StatusTextbox, "Done")

An action which when triggered will set the StatusTextbox to Done.

Inputs

controlThe control to setvalueThe value to set for the control

Output

Outputs an action value which (when run) will set the specified control with value.

SetCrossDocSyncFilter(tableUrl, formula)

[Copy link](/content/formulas#SetCrossDocSyncFilter "Permalink to this formula"/index.html)

Update the sync filter for a cross doc.

Inputs

tableUrlThe url to the cross doc table to updateformulaThe formula to set as the new sync filter

SetPackSyncTableConfigValue(targetUrl, settingName, settingValue)

[Copy link](/content/formulas#SetPackSyncTableConfigValue "Permalink to this formula"/index.html)

Set the sync field setting for a sync table.

Inputs

targetUrlThe url to the sync table to updatesettingNameThe sync field setting to modifysettingValueThe value to set in settingName

SetPageName(page, name)

[Copy link](/content/formulas#SetPageName "Permalink to this formula"/index.html)

Update the name of the target page

SetPageName([My Page], "Current OKRs")

Updates the name of [My Page] to [Current OKRs].

Inputs

pageThe page to modifynameThe new name to apply

Output

An action which when triggered will set the name of the target page.

SetPageVisibility(page, visibility)

[Copy link](/content/formulas#SetPageVisibility "Permalink to this formula"/index.html)

Update the visibility of the target page

SetPageVisibility([Next Step Page], True)

Makes the [Next Step Page] visible.

Inputs

pageThe page to modifyvisibilityIf True the page will be visible. If False the page will be hidden.

Output

An action which when triggered will set the visibility of the target page.

SignUpForCoda()

[Copy link](/content/formulas#SignUpForCoda "Permalink to this formula"/index.html)

Open a dialog that prompts the user to sign up for Coda

SignUpForCoda()

An action which will either have a snackbar pop up saying the user is already signed in or open a modal to allow the user to sign in

Output

An action which when triggered will allow the user to sign up/sign in to Coda if they are not already signed in.