So your confusion is understandable, and is coming from the fact that the output of the previous node is 2 items. Items are “auto iterated”. A sheets node outputting 2 items will pass only 1 item at a time into the next node.
So you are only checking one of the values, not both.
There are ways to solve this tho, could you provide your logical setup JSON in a code block here on the forums to see?
EDIT:
Actually I am unsure if I understood the question. You said “if there is both” and assumed you meant it literally.
If the goal is to route “yes” cases to true branch and “no” cases to false branch?
Then you would simply have one check: {{$json.Used}} contains (or equals) yes.
That would be it. All yes values will proc as true, all no values will proc as false.
@ThinkBot, @Knight Thanks for the reply.
I want to identify if there is ‘no’ in the column. And I only want a true or false outcome. But I get a true for ‘no’ and false for ‘yes’. @Knight when I update the if node, what do I put in the 3 columns? the fx, condition and the last fx?
@ThinkBot, After all the extra step I tried it all ended up back at the same point of not being able to separate out the info I needed. So I ended updated the google sheet I am referring to with a new sheet with the number of yes or no in a column and then got the IF statement to look up this field. They really need to fix up the IF node to work like a If statement should. Thanks for all your help.
I believe there may just be confusion or misunderstanding. I’d gladly try help with more information but I am unsure what your goals are.
One may be that the sheets node outputs items, items are not a single object according to n8n, items are iterated upon by the following nodes. So 10 rows from a google sheet will cause the next nodes to all run 10 times, once for each row. That means you cannot check multiple different row values at one time.
The IF node is designed to route based on a conditional, if you only wanted the flow to continue if Used was No, then you check if its No, and only route the True path from the IF node to the next node. And ignore the false route. That is safe to do, and will cause no issues.
Or if you were trying to have it not even output anything into a secondary path even if its ignorable, you can just use the Filter node instead, and will drop all items/rows that do not contain No if set to No. So only No values will continue in the scenario to the next node.
In either case, you will still be able to retrieve the current row details later in the flow respective to its item/item index. But with the code node method I suggested, that would be a little complicated if the suggested code did not work right to only pass No cases to the next node, since its being set to Run Once for all Items. (and would be used for different cases than to just pass if contains No)
But I still may be misunderstanding what your goal is.