Jeremy_Gillip | 2019-02-25 20:00:56 UTC | #1
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.
MelissaBailey | 2019-02-25 22:03:28 UTC | #2
ToInt accepts a NOTSET and returns a NOTSET 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.
Jeremy_Gillip | 2019-02-26 14:41:49 UTC | #3
That was exactly what i needed. Thank you again.
Jeremy_Gillip | 2019-02-26 14:49:22 UTC | #4
Funny that i never thought about the evaluation step to be the item that would not accept it, very helpful and makes sense now.
system | 2019-03-29 14:49:23 UTC | #5
This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.
This post was migrated from the old Developer Forum.
ref: 4666