Hi,
I'm comparing integers in a multivalued token to a value less than a number. It's throwing false positives.
Is this a bug?
Question
Question
Incorrect Logic Processing
Answer
The issue is that when using the "for each value_current value" token, it's always treated as a string and therefore it's reading your numeric value as a string and comparing it as such. We have filed this issue as bug 711396.
The workaround is to use an "assign token values" activity just inside your "for each value" loop to create a new token for the "for each value_current value" and then when doing the comparison, check that the "new token" is less than 75.
Replies
I believe it is treating the multi-value token values as strings rather than integers. I was able to replicate in a simple workflow; where despite creating a multi-value token and changing the token tag from string to integer, I got the same results as you. I created a 'placeholder' token, tagged it as integer, and populated it in my ForEach Value loop with ForEachValue_CurrentValue just prior to the conditional evaluation. Then in my comparison I check whether my placeholder value is less than 75. This seemed to evaluate correctly. Let me know if you require more clarity, it might help to see more of your worfklow design to see from where your variables are populated.
Thank you for looking into this!
Here's the workflow design:
So you're saying to not use the input parameters on their own instead assign them to a token and do it that way? Do you know when this changed because I've not experienced this beofre.