You are viewing limited content. For full access, please sign in.

Question

Question

Incorrect Logic Processing

asked on September 30 • Show version history

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? 

0 0

Answer

SELECTED ANSWER
replied on October 1

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.

0 0
replied on October 1

Thanks! What y'all recommended finally clicked with me and it worked. I appreciate it!

0 0

Replies

replied on September 30

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.

0 0
replied on October 1 • Show version history

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.

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.