parseInteger(string attribute)>0 will return an error if the string attribute cannot be parsed to int. so you just need to create an error handling flow, look at this :
https://docs.mendix.com/refguide/error-handling-in-microflows/
a second option would be to use a regex with the function ismatch()
Hi Chaitali Gangane,
you can check with the below regex expression
isMatch($Entity/attribute, '^([0-9]+)$')
Hope it helps you!
Hi Chaitali,
You are on the track, but you also have to customize the error handling of the action parsing the string in order to catch the exception, and then apply an error handler activity flow as Yehoshua already explained.
Best,
Istvan
It sounds like the string needs to start with a digit that isn’t zero, and be followed by zero or more digits. We can look for this using a regular expression and isMatch.
isMatch($Entity/attribute, '^[1-9][0-9]*$')
If this passes you can then use the parseInteger method to convert the string to an integer.
parseInteger($Entity/attribute)
I hope this helps.