I have a workflow based on consuming data from multiple SeaTable tables and creating the appropriate folder structure as well as accompanying JSON files, and downloads files hosted by SeaTable. The workflow is by no means complete. I currently have one loop nested inside another. I will have to nest another loop inside that nested loop.
The issues:
The first loop (For Each Course) receives 3 items through the previous validator node but only iterates through the first 2.
The nested loop (For Each Lesson) receives 5 items from the Lessons table (3 for first course and 2 for the second) but only iterates through the first 3.
I’m sorry to hear you’re having trouble. Unfortunately I am not able to run your workflow since it seems to rely on data only available to you.
Is there a chance you simply need to adjust the order in which you connect your loops? This might be a bit counterintuitive but I posted a simplified example a while back here which hopefully makes things a bit easier to understand:
I still get the same result but I am not entirely sure I connected the nodes in the correct order.
In the example you showed it’s the node before the IF node that gets connected back to the Split In Batches node, however in examples I found elsewhere in the forum it was the IF node that got looped around to the Split In Batches node.
Can you have a look at the screenshot and help me out with which nodes to disconnect and the order to reconnect them?
Yes, connecting both outputs of the IF node in the example would make things simpler indeed, but it seemed like a good example to visualize things here.
But generally speaking, my suggestion here would be to start with a much smaller workflow. Build a single loop, something like this:
Make sure it works as expected, then add the functionality of the inner loop step by step, retesting the workflow frequently. Once you’re happy with the inner loop, build the outer loop around it.
I sure can take a closer look at your workflow if you feel stuck but I won’t know when that would be tbh seeing you have provided a beast of a flow that can’t simply be executed and played around with
I have discovered that the Split In Batches node does not reset currentRunIndex for every iteration of a nested loop while keeping the maxRunIndex at the value of the first iteration.
For example let’s say the first parent loop sends the following number of items in each iteration:
3 items
1 item
2 items
Then at the end of each iteration of the nested loop currentRunIndex will be:
3
4
6
Since maxRunIndex of the first iteration was 3, all subsequent iterations have a value higher than that and return false when the condiition is set to: currentRunIndex < maxRunIndex
Hey, anyone figure out a solution to this? It looks like this is a bug. I’m still experiencing an issue similar to this. @MutedJam what is the expected behavior? Can you confirm whether or not you’re seeing the behavior described in the post above on your end?