Skip to content
Using Spreadsheet-s...
 
Notifications
Clear all

Using Spreadsheet-style Formulas to Combine Multiple Variables into One with callin.io

3 Posts
3 Users
0 Reactions
5 Views
PaulKortman
(@paulkortman)
Posts: 14
Eminent Member
Topic starter
 

My team and I frequently encounter this issue with CRMs that have multiple fields for email addresses. Please review the following screenshot:

Screenshot 2020-02-13 18.52.19.png

We are not entirely certain if the 'Home Email' field will always contain an email address, yet the subsequent step requires an email address for this lead/contact. Therefore, here is a tip I use to resolve this situation.

Add a Formatter - Numbers - Spreadsheet-Style Formula step

Screenshot 2020-02-13 15.23.10.png

I use the formula below. Remember, when working with strings or string values in the Spreadsheet-style formula, you must enclose the values in quotes.

if("{{mobile_email}}"="",if("{{home_email}}"="","{{work_email}}","{{home_email}}"),"{{mobile_email}}")

In plain terms, this formula checks if 'mobile_email' is empty. If it is, it then checks if 'home_email' is empty; if both are empty, it uses 'work_email'. If 'mobile_email' is empty but 'home_email' is not, it uses 'home_email'. If 'mobile_email' is not empty, it uses 'mobile_email'.

In its current configuration, this formula does not verify if 'work_email' is empty when all email variables are empty. In such cases, the output of this step would be "" (empty or null). If this happens, we do not have a valid email address. You might consider adding a path/filter in the next step to prevent processing if the output of this formula is empty, thus avoiding attempts to create a contact.

If you wish to check the third variable for an empty state and provide a replacement, you could use this variation of the formula:

if("{{mobile_email}}"="",if("{{home_email}}"="",if("{{work_email}}"="","Value For all three empty","{{work_email}}"),"{{home_email}}"),"{{mobile_email}}")

Nested IF statements can become complex, but they are generally very useful for combining, replacing, or condensing variables based on their values.

 
Posted : 04/08/2025 8:31 am
Danvers
(@danvers)
Posts: 15
Active Member
 

This is a great tip, thanks!

 
Posted : 14/02/2020 12:00 am
chris_wandrian
(@chris_wandrian)
Posts: 1
New Member
 

It appears something has been updated. I'm encountering an issue while attempting to use this, specifically receiving a
Formatter error: Invalid Syntax: Only numeric values are allowed
error. This is happening even when I utilize the Transform text with a spreadsheet-style formula. action within a text event!

 
Posted : 09/08/2024 12:00 am
Share: