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.

2 Likes

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.

2 Likes

Hi @MutedJam

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

1 Like

you are my hero!

I was figthing with IF node because it only worked for fisrts item… now I get it!

God bless you! thanks!

1 Like