Skip to main content
Best answer

How to convert number range to text?

  • April 22, 2022
  • 8 replies
  • 613 views

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!

Best answer by christina.d

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!

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

Forum|alt.badge.img+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! 🤗 


Troy Tessalone
Zapier Orchestrator & Solution Partner
Forum|alt.badge.img+14
  • Zapier Orchestrator & Solution Partner
  • April 23, 2022

Hi @olivedrab 

Good question.

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

 


  • Author
  • Beginner
  • April 25, 2022

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)


Troy Tessalone
Zapier Orchestrator & Solution Partner
Forum|alt.badge.img+14
  • Zapier Orchestrator & Solution Partner
  • April 25, 2022

@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.


  • Author
  • Beginner
  • April 25, 2022

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


Troy Tessalone
Zapier Orchestrator & Solution Partner
Forum|alt.badge.img+14
  • Zapier Orchestrator & Solution Partner
  • April 25, 2022

@olivedrab 

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


Forum|alt.badge.img+4

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


christina.d
Forum|alt.badge.img+9
  • Zapier Staff
  • Answer
  • June 9, 2022

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!