IsNumeric in Power Automate

Turns out there’s no IsNumeric function in Power Automate (AKA Flow). This is a bit frustrating when you want to check if a returned value is a number!  I had a search and found a few suggested ways – e.g. Try/Catch/Finally, using an Array to check each value in turn and finally using the int() function and continue on fail. 

All options were perfectly sound but seemed overly heavy, using the last idea as my main inspiration. I came up with the below elegant expression that checks if a value is numeric (by converting it to an int but producing a boolean for the if condition using a greater than or equal to test), It returns either Int (for integer/a number) or Str (for String / characters).

if(greaterOrEquals(int(var(‘VarToTest’),0),’Int’,’Str’)

You can then use a condition to decide what to do if you have a number/string.  But remember – and this bit is very important if you don’t want it to always fail your flow, set the “Configure run after” to both is successful and has failed.

Here’s the actions:

Hope this helps!

About the author