Formula Playground


The formula playground lets you experiment with Conjointly's formula syntax before using it in your studies, helping you ensure your formulas work as intended.

Example formulas

Below are example formulas you can use in the playground to get started. Simply click on the example formula to automatically copy and paste it into the formula playground.

Text manipulation functions

contains - Check if a string contains another string

contains(search_in: String, search_for: String) → Boolean

  • contains("apple", "app")
  • contains("apple", "1")

endsWith - Check if a string ends with another string

endsWith(search_in: String, search_for: String) → Boolean

  • endsWith("apple", "le")
  • endsWith("apple", "c")

startsWith - Check if a string starts with another string

startsWith(search_in: String, search_for: String) → Boolean

  • startsWith("apple", "ap")
  • startsWith("apple", "b")

toString - Convert to string

toString(value: Any) → String

  • toString(11)
  • toString(true)

For more text manipulation functions, check out the guide for text formulas.

Numerical operations

ceil - Returns the smallest integer greater than or equal to a given number

ceil(value: Number) → Number

  • ceil(1.1)
  • ceil(-1.9)

floor - Returns the largest integer less than or equal to a given number

floor(value: Number) → Number

  • floor(1.1)
  • floor(-1.9)

round - Returns the value of a number rounded to the nearest integer

round(value: Number) → Number

  • round(1.1)
  • round(1.5)

toFixed - Converts a number to a string, keeping a specified number of decimals

toFixed(value: Number, [fractionDigits]: Number) → String

fractionDigits: The number of digits to appear after the decimal point; this may be a value between 0 and 20.

  • toFixed(1.2345, 2)
  • toFixed(1.2345, 3)

toNumber - Convert argument to Number

toNumber(value: Any) → Number

  • toNumber("1")
  • toNumber("123") + 4

For more numerical operations, check out the general formula guide.

Date and time functions

toDateTime - Convert a text string in ISO 8601 format into date and time.

toDateTime(input: String | Number) → DateTimestamp

  • toDateTime("2021-01-01T00:00:00Z")
  • toDateTime("2024-05-03") < toDateTime("2024-05-02")
  • toDateTime("2024-05-10") > toDateTime('2024-05-01')

For more date and time functions, check out the guide for date and time formulas.

Logical operations and conditionals

if - Checks condition and returns a value if it is true or another value if it is false

if(condition: Boolean, then: Any, [else]: any) → Any

  • if(true, "yes", "no")
  • if(false, "yes", "no")
  • if(1 > 2, "yes", "no")

ifs - Returns a value that corresponds to the first true condition or the else value if all other conditions are false

ifs(condition1: Boolean, then: Any, [condition2]: Boolean, [then2]: Any, ...[else]: Any) → Any

  • ifs(1 > 2, "1 > 2", 2 > 3, "2 > 3", "else")
  • ifs(1 > 2, "1 > 2", 2 > 3, "2 > 3", 3 > 4, "3 > 4", "else")

For more logical operations and conditionals, check out the general formula guide.