ToInt() String Error

I am using a Decision Logic Check in Architect to convert a String that has a integer value that was saved to the flow via a Data Dip. Sometimes the Data for the Integer is Not_Set or Blank. To the Expression Editor in Architect, its states that i can have a Not Set or Blank value as a ToInt("") > 0 and it would be valid but when i test that i get the Generic, Sorry an Error occurred, please try your call again later and disconnects instead of just taking the no path and moving on. is this a Bug or as designed?

Thank you in advance.

ToInt accepts a NOT_SET and returns a NOT_SET integer. However the greater than function does not allow NOT_SET. You need to do a null check, like this:
If(IsNotSetOrEmpty(Task.s1), false, ToInt(Task.s1) > 0)

For the Task.s1 variable, if it's not or empty, the expression will return false (you can return true if that would make sense for your use case); otherwise it will do the comparison.

1 Like

That was exactly what i needed. Thank you again.

Funny that i never thought about the evaluation step to be the item that would not accept it, very helpful and makes sense now.

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