The wonderful little formula that makes all things faster and new things possilbe
Before everything - What is this formula?
withName() is like the bit.ly of Coda. The mnemonic device of Coda.
Bit.ly
Takes long and complex URLs and shortens them
Mnemonic Devices
Takes long and complex phrases and creates a way to memorize them easily
withName()
Takes long and complex formulas and allows you to reference them easily
First - let’s just learn how it works.
The withName() formula is like saying:
Hey Coda, Im going to give you a long formula. I’ll probably want to use it later, so can you remember that formula by a sweet little nickname I give it?
withName() needs three things to make it work (or three parameters)
(1) The long formula: Your formula editor calls it the value
(2) The sweet little nickname you want to give it: Your formula editor calls this the name
(3) The formula you will write using that given nickname
Here’s a quick example. Lets say that I want to draft a sentence that tells me how many people in the
Now - let’s learn how to unlock new possibilities in your doc
WithName() does require extra keystrokes and admittedly does have a small learning curve. So when and where should you use it to actually provide value to your workflows or docs?
First off - if you are writing a longer formula that utilizes filter() within a formulaMap() you will need to use withName() to access the currentValue within the formulaMap() loop.
If that sounded like Latin, let’s take a concrete example. To the left you will see a list of 10 individuals with age information. Let’s say you wanted to write a Canvas based formula to draft a summary list of the amount of people that match a certain age and let their names be instantly clickable in order to pull up their information. You will need to use withName() to do that.
Here’s the formula (Right click to see how its written)