Hey @fernando2 and all the other List Popper fans out there. I just pushed List Popper & Friends v 1.2.2, which adds a new SSA called List Slicer Pusher SSA.
List Slicer Pusher is kind of like a combined List Popper and List Pusher. It takes some list (the “List of Items”) and allows you to slice an arbitrary number of items off of that list (returning the Sliced Items), then it optionally takes a list of “Items to Push” and can push all of those items, or just some number of items on to the remaining List of Items. The Pushed Items, Remaining Push Items, and Remaining List are returned to their respective outputs.
@fernando2 I did pretty thorough checking on this, but there could be edge cases where some combination of configurations do not work (like lots of my plugins, there are NO required fields in List Slicer Pusher, and a lot of potential combinations of functionality making it difficult (if not impossible) to test for all edge cases. But should be pretty solid!
READ THE DOCS in the interface as some options are very fancy. One cool thing is you can make the slicing “dynamic” which means that, however many new items you PUSH, that same number of items is SLICED off the List of Items first. In this way, you could have iterations that, regardless of the number of pushed items, the total length of Remaining Items remains constant until the total number of Items to Push is totally depleted. (Of course, that could also lead to endless recursion if you don’t check for the emptiness of at least one of the output lists to stop recursion.)
Let me know how it works out or if there’s a feature here you need that I didn’t think of.
As always, recall that I work for tips!