The not equal operator is not working. I have an if activity testing for not equal and it always go to the else statement. The right side of the equality doesn’t matter, whether I use “1” or any other number, it always go to the else activity.
If, however, I use “=” rather than “<>”, the “then” activity is executed, again doesn’t matter what number I use on the equality.
I tried both in_TransactionItem.toString <> “1” and in_TransactionItem <> “1” (toString removed), and not working.
Would someone please confirm that <> is not working instead of suggesting other ways to test the inequality/equality?
Use not intransactionitem.ToString<>“1” doesn’t work. It works the way I described to be a problem.
“Use !string.equal operators” — So basically, the “<>” doesn’t work (or maybe even “=”). This question has come up a few times and no one specifically said it doesn’t work. Only suggestions on what to use but not necessarily categorically saying “<>” doesn’t work. (“=” doesn’t work either).
To the developers, “<>” is simple and easy to understand, there’s no need to go away from it nor deprecate its use.
The else block is executing regardless of the value of in_TransactionItem (be it “1”,“2”,“3”, etc.) If I change it from “<>” to “=”, the “then” block executes, again regardless of the value of in_TransactionItem.
It only works if I use string.equals operator. So hopefully other people will find this post and know that “<>” or “=” doesn’t work.
Can you pls check is there any variable named as in_TransactionItem?
in some times we accidentally create variable and argument with the same name in that case it picks variable instead of argument so every time else will execute.
Basically <> or = are to marched object reference. And equals is to match value. Still in my testing behavior of <> and equals is same. It is working as expected.
have you created this argument in outer or inner scope by mistake? please do a check to ensure you do not have this variable declared anywhere else in the solution.