Use nested IF statements for conditional field retrieval

  • 10 May 2024
  • 0 replies
  • 47 views

Userlevel 4
Badge +1

Hi there ✌

You might have encountered this situation:

You need to create a lead in your CRM, but the email address can come from different fields in another app. The email address might be found in field 1, field 2, or field 3.

So, how do you set up the Zap to use field 1 if it exists, otherwise use field 2 if it exists, or otherwise use field 3?

We can use the Formatter tool for this!

Select Formatter > Text > Spreadsheet-Style Formula, and use a nested IF statement, as shown below.

Here’s an example of what this looks like:

Nested If Statement

 This is the formula to use:

IF("{{239371880__email1}}"<>"","{{239371880__email1}}",IF("{{239371880__email2}}"<>"","{{239371880__email2}}","{{239371880__email3}}"))

Basically, what this formula does is:

  • If email 1 is not empty, then use email 1

  • Otherwise, if email 2 exists, use email 2

  • Otherwise, use email 3

The output of this step can then be used in a subsequent action step.

Hope this helps!

 


This post has been closed for comments. Please create a new post if you need help or have a question about this topic.