Check if a Flow variable of String has only numbers

Part of the Architect flow, I need to check if a flow variable (string) has a phone number or extension digits. Basically, we need to check if the flow string has all the numeric characters?
I searched for the functions like ToJason() / isJsonNumber() etc. but nothing worked.

It is a simple language construct but I could not find a way to get this done in Architect. Thanks for any ideas on this and will be a great help..

Thank you.

Ajay

If you don't have a level of control over the string var to trust a ToPhoneNumber() then you can use the ToInt() function passing a default value, to prevent flow error handler, e.g.
Then do a decision on it, or an expression directly with the example checking if == to 0 to follow a NotANumber route

ToInt(MyStringVar,0)

Thanks for the quick response. I would check like this.

ToInt(Flow.OptionalMessage, 0) != 0

Then will transfer to a number.

That should work. Thanks again.

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.