Text functions in Notion formulas!

Notion Apr 19, 2023

Using Notion formulas to perform complex calculations and get the most out of date/time elements is amazing but why stop there? You can use Text functions to manipulate and extract information from text entries within databases!

In the previous article of the Fantastic Fantastic Formulas, we learned how to use Date and time functions. Make sure to check out the whole series for a full guide on how to use functions in Notion formulas to build custom formulas on your own!

Without further ado, let's start.

Here are all the Text functions that can be used to build Notion formulas:

  1. concat
  2. contains
  3. format
  4. join
  5. length
  6. replace
  7. replaceAll
  8. slice
  9. test

As in the previous articles of this series, I will explain each of these functions along with examples.

1. format()

The format function allows you to format a text string using placeholders. The function takes a string as its first argument, which is the text string to format. The second argument is a string that contains placeholders, which are surrounded by curly braces ({}). The placeholders are replaced with the corresponding values from the remaining arguments.

For example:

format(dateBetween(prop("Date"), now(), "days"))
format() function statement

As you can see below, the formula is working! 🔽

Notion Formulas | Text Functions
format() function example

2. concat()

The concat function allows you to combine two or more text strings into a single string. The function takes one or more arguments, which can be either text strings or references to other text entries, and returns a single string that is the concatenation of all the input arguments.

For example:

concat(prop("Format"), " ", "Days Left!")
concat() function statement

As you can see below, the formula is working! 🔽

Notion Formulas | Text Functions
concat() function example

3. contains()

The contains function returns a Boolean value indicating whether a specified string is found within another string. The function takes two arguments: the string to search and the string to search for. If the string to search for is found within the string to search, the function returns true, otherwise it returns false.

For example:

if(contains(prop("Status"), "Done"), "✅", 
if(contains(prop("Status"), "Upcoming"), 
"🟡", if(contains(prop("Status"), "Missed"), "❌", " ")))
contains() function statement

As you can see below, the formula is working! 🔽

Notion Formulas | Text Functions
contains() function example

4. join()

The join function allows you to concatenate all elements of an array into a single string, with a specified separator. The function takes two arguments: the array to join and the separator to use between the elements. The separator can be any text string, including an empty string.

For example:

join("-", prop("Format"), "Days", "till", prop("Name"))
join() function statement

As you can see below, the formula is working! 🔽

Notion Formulas | Text Functions
join() function example

Conclusion

Now you know how to use the first four Text functions in Notion formulas. Use these functions to enhance your Notion workspace and add custom features to it by building your own custom formulas using these functions! You can also use our shortcut commands template to be more efficient using these.

Remember to check out other articles in the Fantastic Formulas series to learn how to use formulas in Notion databases from A-Z! Check out our Twitter account 🐦 for daily updates, latest Notion template launches, hot deals on Premium Top-rated Notion templates and helpful tips/tricks to get the most out of Notion!

Tags

Great! You've successfully subscribed.
Great! Next, complete checkout for full access.
Welcome back! You've successfully signed in.
Success! Your account is fully activated, you now have access to all content.