How to move list's last item to first position?


I’m trying to figure out how to tell Bubble to move the last item from a list to the first position.

Thing’s List = [a, b, c, d]

Backend Workflow should modify Thing to:

List = [d, a, b, c]

I’ve tried List = Thing’s List:last item merge with Thing’s List:item until#Thing’s List Count -1

But bubble won’t allow the -1 after count… :sob:

Any suggestions?

Hey @benjamin1

I’m thinking this might work:
List = Thing’s List:last item merge with Thing’s List with a condition on the cell’s group: when current cell’s index is RG’s List of items:count > this element is not visible

I should mention this is a back-end workflow hence no RG.

It seems you can do it with ListPopper plugin.

Hmm. Would this plugin let me change the value of the first item to be the sum of the 2nd and third? Rather than switch them? I’m trying to figure it out but my brain’s not quite getting it.

The plugin only operates the items order - not values. You can change values with a workflow by referencing item#.

This topic was automatically closed after 70 days. New replies are no longer allowed.