I’m having trouble with workflows where I need to check a condition, then grab info from nodes prior to the IF node to do an operation.
Let’s say I have 3 items from a search node. I want to check each item for a specific condition which I do with the IF node. If true, I want to do something to the item but I need some data from a node not immediately preceding the IF node. (In the example below, I need some info from the Bubble node).
What happens is: Items 1 and 2 go to the false branch, then on item 3 when I try to get the corresponding item from the Bubble node, it actually gets item #1. How do I get the correct item from before that IF node?
The workaround for me has been using SplitInBatches, which forces the data to be one item at all times so I can always get the correct one if the IF branch resolves to true. However, I feel like I’m missing something obvious here.
Hey @Giovanni_Segar, your problem should be solved by the paired item functionality we’re currently working on (essentially giving you an easy way to get the connected items from previous nodes).
For now, the easiest approach would be to use a Set node before your IF node, pulling in all the data you might need after the IF node.
@jan To be clear, if I have 3 items going to an IF node and only the 3rd one gets through, using that syntax will match the 3rd output from whatever node I reference, even if it’s several nodes behind the IF? That’s great