Formula: StartsWith() and EndsWith()
Category: String
StartsWith()
Checks if string of text starts with chosen values
It’s kind of like saying...
Hey Coda, will you see if the text I provided with starts with [x]?
EndsWith()
Checks if string of text ends with chosen values
Or put another way...
Hey Coda, will you see if the text I provided with ends with [x]?
StartsWith() and EndsWith() share two required parameters:
Text
StartsWith(Text, Prefix)
This is the text you want to the formula to check.
Prefix/Suffix
StartsWith(Text, Prefix)
These are the values you want the check for at the start/end of your text.
They also share two optional parameters:
IgnoreCase
StartsWith(Text, Prefix, IgnoreCase, IgnoreAccents)
"True" if you want to ignore case of the text; defaults to false.
IgnoreAccents
Right(Text, Prefix, IgnoreCase, IgnoreAccents)
"True" if you want to ignore accents in the text; defaults to false.
StartsWith() and EndsWith() are as they seem. You provide them a text and they let you know if that text starts with or ends with a certain value.
Below is a table titled “Famous Book Openings” that consists of opening lines from different novels.
A student is doing research to determine how many novels start their books with vowels vs. consonants.This students uses StartsWith() and a to find her answer in the gray “sentences” column below.
Books That Start With Vowels
StartsWith() also has one other fantastic use-case. It is most often used to pull out action-items or tasks out of a Canvas Column full of free-form notes. Lets look at an example:
Below is a table of projects with a canvas Notes column. The Notes column is a free-form section for a team to take notes, jot down ideas, add screenshots, leave comments, etc. But often there are also embedded tasks within the free-form notes. StartsWith() allows you to filter through the notes section and pull out any lines that start with the word “Task:”.
Click into the “Notes” column below to see the teams free-form notes. Then click into the Action Items column to see the formula utilizing StartsWith() to pull out any tasks.
Further Details
The Action-Items formula which is in the screenshot above may seem intimidating, but here is what it’s doing.