I’m trying to figure out how to bring back the ‘Order_id’ value of the next row into the current row. I found a workflow example here that shows how to bring back the ‘Order_id’ value of the previous row into the current row (as seen in the below picture), though I’m unable to figure out how to modify this to bring back the ‘next’ row. Any thoughts on how to do this in a Java Snippet Node?
Below is what i have so far. The first two columns are the data, and the last column is from the Java snippet
Thank You @HansS and @ipazin, both your solutions work. Would a solution be possible in the Java snippet, or would the Lag and Moving Aggregation nodes be the only way to accomplish this?
No there isn’t. (Rows are consumed in a specific order; the reason we can reference the last row is because we’ve already had it given to the node (and so the reason we cannot reference the next row is because we have not been given it yet.))