IF node Issue

Hi Team
I am having a small problem comparing the two values within a IF node.
I have 3 items as output from a Set node and a single item as Output from another set node. When i try to compare if the string matches between these 2 set outputs, the IF node only checks the first item ignoring the rest. I am not sure whether i am doing a mistake or not understanding the concept. Could you please help on this.

Image-1

I have the value NEW_TEST available in Schedule Name in SET NODE 1 as well as the TWS Object in SET node. But the IF condition doesn’t return a true condition.

1 Like

Hey @Siddu, is there a chance your first Set node only returns a single item? If so, you probably want to use an expression like {{$item(0).$node["Set"].json["TWS Object"]}} in your IF node.

Without the $item(0), the IF node would compare the first incoming item with the first item from your Set node which works fine. However, it would then try to compare the second item with the second item from your Set node which most likely doesn’t exist.

1 Like

Hi @MutedJam

Thank you for the response!!! It worked out Fine… :grinning: :grinning: :grinning:

1 Like