Is there a easier way to check that a field is numeric no using input masks or Regular expressions?

This is how i am validating a field is numeric but there must be a easier way? I am parsing the attribute i am validating to a string (toString($attribute)) then i call a microflow(reusable)that returns a boolean. In the called microflow I create a variable of type Integer/long and parse the string(My input parameter) that I've just created back to a integer(parseInteger). I set error handling to custom without rollback. So if the attribute is not numeric and cant be passed back to a Integer it will cause an error and the microflow will return False and if it is numeric and can be passed to an integer the microflow will return true. Is there a IsNumeric function or something i can use in exclusive split not using an input mask or a regular expression.
2 answers

You can use the expression isMatch($yourobject/yourattribute, '^([0-9]+)$'). It uses a regular expression to match, see this, but you use it in an exclusive split. Used this dozens of times, works like a charm.


That is the correct way.