Question

Omit Text from paragraph if value from form entry is empty

  • 22 October 2021
  • 1 reply
  • 24 views

Hello wonderful people I come with a question.

 

I have a Zoho Form that has a few different branches. These branches only depend on the amount of data being submitted in the form.

 

For example. The first branching question asks how many People have info being submitted about them. Which there can be selected 1-3. And the for each of these people having data submitted about them, there can be a varying amount of data collected per person. For example, for person 1, how many unique items are they getting. Between 1-3. And then there is data to be collected about each unique item.

 

I am wanting to take this data and send it out in an email. The question I have is, is there a way to send an email that only populates specific text in the email if the value is not empty. For example this is how it would be setup if I were to send every data point in each email.

 

“A New Form Has Been Submitted

Number of People - {Number of People from Zoho}

Person 1 Name - {Person 1 Name from Zoho}

Person 1 Items - {Number of Items for Person 1 from Zoho}

Person 1 Item 1 UPC - {UPC of Person 1s First Item from Zoho}

Person 1 Item 2 UPC - {UPC of Person 1s Second Item from Zoho}

Person 1 Item 3 UPC - {UPC of Person 1s Third Item from Zoho}

 

Person 2 Name - {Person 2 Name from Zoho}

Person 2 Items - {Number of Items for Person 2 from Zoho}

Person 2 Item 1 UPC - {UPC of Person 2s First Item from Zoho}

Person 2 Item 2 UPC - {UPC of Person 2s Second Item from Zoho}

Person 2 Item 3 UPC - {UPC of Person 2s Third Item from Zoho}

 

Person 3 Name - {Person 3 Name from Zoho}

Person 3 Items - {Number of Items for Person 3 from Zoho}

Person 3 Item 1 UPC - {UPC of Person 3s First Item from Zoho}

Person 3 Item 2 UPC - {UPC of Person 3s Second Item from Zoho}

Person 3 Item 3 UPC - {UPC of Person 3s Third Item from Zoho}”

 

In this case if I were to only have 1 Person to collect data for and 1 item for that person, it would generate an email that looks like this.

 

“A New Form Has Been Submitted

Number of People - 1

Person 1 Name - Albert Smith

Person 1 Items - 1

Person 1 Item 1 UPC - 123456789789456123

Person 1 Item 2 UPC -

Person 1 Item 3 UPC -

 

Person 2 Name -

Person 2 Items -

Person 2 Item 1 UPC -

Person 2 Item 2 UPC -

Person 2 Item 3 UPC -

 

Person 3 Name -

Person 3 Items -

Person 3 Item 1 UPC -

Person 3 Item 2 UPC -

Person 3 Item 3 UPC -”

 

I want to be able to avoid sending all the unnecessary text if possible.

 

I originally thought of doing a path for each scenario 1 Person, 2 People, 3 People. And then inside of those paths create more paths for each combination of the number of items each person could have. However, I quickly realized this method has a scaling problem. In the future we could very well be collecting data about 5 different people using the same form. And if that is the case, there are too many permutations of what 5 people and how many different items they have.

 

I am wondering if there is a way inside of the email to use an expression that will only print the precursor text if the value from Zoho is not empty. Or if there is another solution entirely to the problem that would be wonderful as well.

 

Thank you so much in advance for your time!


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

1 reply

Userlevel 7
Badge +14

Hi @Walking Comfort 

The advanced approached would be to use 1 Code step to handle the logic and prep the data for the email.

Code: https://zapier.com/apps/code/help

Consider hiring a Zapier Expert to help: https://experts.zapier.com/