Formula: StartsWith() and EndsWith()
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]?
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:
This is the text you want to the formula to check.
These are the values you want the check for at the start/end of your text.
They also share two optional parameters:
StartsWith(Text, Prefix, IgnoreCase, IgnoreAccents)
"True" if you want to ignore case of the text; defaults to false.
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.
The Action-Items formula which is in the screenshot above may seem intimidating, but here is what it’s doing.