Best answer

How to convert number range to text?

  • 23 April 2022
  • 8 replies
  • 357 views

Userlevel 1

Hi, our zap trigger is a form with a question that collects a number. Depending on the number, I need to convert it to text. For example:

If the number is 0–200, then produce the word “YES”

If the number is 200+, produce the word “NO”

How would I go about creating this?

Thanks!

icon

Best answer by christina.d 9 June 2022, 09:47

View original

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

8 replies

Userlevel 3
Badge +4

Hey @olivedrab ! I’d recommend using the lookup table feature with the formatter tool! 🙂Here is a link to an article that walks through step by step how to set it up- https://zapier.com/help/create/format/create-lookup-tables-in-zaps. Hopefully this answers your question, best of luck! 🤗 

Userlevel 7
Badge +14

Hi @olivedrab 

Good question.

You can use a Zap with Paths or Filters: https://zapier.com/apps/filter/help

 

Userlevel 1

Hey @olivedrab ! I’d recommend using the lookup table feature with the formatter tool! 🙂Here is a link to an article that walks through step by step how to set it up- https://zapier.com/help/create/format/create-lookup-tables-in-zaps. Hopefully this answers your question, best of luck! 🤗 

Thank you so much for taking the time to respond @TamRazzleDazzle. This seemed like a good solution, but turns out I can’t specify a range of values in the lookup table :( And there are too many values to specify one by one.

 

Hi @olivedrab 

Good question.

You can use a Zap with Paths or Filters: https://zapier.com/apps/filter/help

 

Thank you for the suggestion @Troy Tessalone. My Zap already has one filter and I was hoping to reduce the amount of zaps to manage (there are quite a few steps, and there are 5 paths).

Might another solution be a Zapier Code step that looks at the numbers range and depending on where the number falls, produce a string of text? (was hoping to avoid the code part)

Userlevel 7
Badge +14

@olivedrab 

Yes, a Code step is an option if you know JavaScript or Python.

You can chain Zaps together using Webhooks. (also an advanced approach)

You could have 1 Zap per Path instead of using the Paths app in a Zap.

Userlevel 1

I’m afraid the code solution may be the one here. Thanks for helping me work through this @Troy Tessalone.

Userlevel 7
Badge +14

@olivedrab 

Some JavaScript resources: https://www.w3schools.com/js/

Userlevel 3
Badge +4

ah I see! I’m glad Troy was able to help you find a solution using code! 🙂

Userlevel 7
Badge +9

Hey friends! I wanted to pop in and summarize some of the answers posted here!


Assuming there aren’t too many values we had a great suggestion here:

I’d recommend using the lookup table feature with the formatter tool! 🙂Here is a link to an article that walks through step by step how to set it up- https://zapier.com/help/create/format/create-lookup-tables-in-zaps.

In this particular case though Troy’s solution of:

@olivedrab

Yes, a Code step is an option if you know JavaScript or Python.

You can chain Zaps together using Webhooks. (also an advanced approach)

You could have 1 Zap per Path instead of using the Paths app in a Zap.

may be the best route to go!

He also dropped some Javascript resources here:

https://www.w3schools.com/js/

I hope this helps!