• Documentation
  • Workato Blog
  • Product Blog
  • Return to Workato
  • Login
  • Automation Institute
  • Documentation
  • Community Forums
New Topic
Discussions Recipe Building Formula Mode Questions
S

Saul Macht

started a topic over 5 years ago
Answered

Check field value if it's an integer

I want my recipe to return "true" if the value of my data pill is a string. Is there a formula for this?


Best Answer
P
Patricia Guevarra said over 5 years ago

Hello Saul,


There is certainly a formula for this. Please try using .match?(/^\+?\d+$/) after your data pill. Do try this out and let us know if you face any issues.

Answer

Patricia Guevarra

said over 5 years ago

Hello Saul,


There is certainly a formula for this. Please try using .match?(/^\+?\d+$/) after your data pill. Do try this out and let us know if you face any issues.

R

Ravi Shankar

said almost 3 years ago

This is not working for me: It is returning false. It should return true because before .match function value is "BER:" which is text.

image

Patricia Guevarra

said almost 3 years ago

Hi Ravi,


Sorry, looks like there was some lack of clarity in the previous posts. The given formula checks if the string is an integer, and will return true if the value in the data pill is an integer. Did you instead want to check if there are no digits in the datapill value?

Login to post a comment

Still can't find your solution?

Send us a ticket, we will try our best to assist you with your problem

Documentation
Developer's Library
Tutorials
eBooks
Product Hour
Product Blog
Workato Blog
Product updates
Customer Stories
© Workato 2022   Privacy   Terms   +1 (844) 469-6752
  • Documentation
  • Workato Blog
  • Product Blog
  • Solutions
  • Forums
  • Tickets
  • Log in
  • Return to Workato
Topic views count