List Shifter: Reverse, Rotate, Swap and ITERATE (Loop) Over Bubble Lists | Now Part of Floppy

Process List cannot access actions like Create / Make Changes. Plugins cannot directly modify the database. Only you can do that via the Make/Change actions.

(There is no free lunch, as they say.)

@keith
Ah ok - well let me do some more testing and see what works.

Great plugin though, appreciate all your hard work!

1 Like

Thanks for the kind words, @hero! Yeah, there’s zillions of applications for List Shifter, but it can only do things that are actually possible. :wink: The main focus is really on manipulating lists, creating lists of primitive data types, constructing new lists by “processing” existing ones, and doing iterative calculations.

Iterating with the “Iterate” action (running a workflow sequentially over n items) is still subject to any limitations of Bubble workflows. While we can create new items or modify objects in the database, these operations take time and Bubble has some clever optimizations that (in essence) make it seem – inside the page – that the action is complete, when in fact, it hasn’t truly happened in the backend. (Basically, a local copy of the modified object exists in the page and we can proceed with on-page actions without waiting for the database to be synchronized.)

This isn’t an issue in most vanilla Bubble cases (as you can’t really iterate anyway). So List Shifter’s Iterate action represents a departure from what’s expected.

If you stick to reading data values, etc. everything works as expected. But there’s no magic bullet for increasing the speed at which backend modifications can be made.

Hi @keith,

Why are you hiding your plugins code with minify, when free plugins are supposed to conform to the open source MIT license?

Because it must be manually minified: Bubble uses a version of closure compiler that can’t compile part of the source of List Shifter. So I have to manually minify it using Uglify.

1 Like

Same thing with LOADERR, BTW (and same issue: async/await).

But also: Open Source !== Easy to Read

That is the source code. Because JavaScript. That being said, I could point you to a more easily understood repo sometime.

1 Like

Thanks for explaining the good reasons for minifying on the Bubble source page :smiley: Yes a link to the source is a good idea!

More cool live bubbling videos with @keith: #lockdownandlearnwithkeith

1 Like

list shifter is darn powerful…and for a ‘knows enough to be dangerous and not one jot more’ type, very helpful and daunting. However, I really can’t figure out how to save the list as you have suggested and have the outcome as described. (FWIW, although drag-and-drop is the ideal UX here, I’ve abandoned it for now and am using simple buttons for moving things around)

here are my data types (things) that matter in this case:

  • user (and relevant fields)
    – task lists (a list of type task list)
    – tasks (a list of type task)
  • task list (and relevant fields)
    – tasks (a list of type task)
    – owner (the user that created/owns this list)
  • tasks (and relevant fields)
    – task list (which task list does this task belong to)
    – owner (who created the task)

So, trying to follow your advice here (and in your tutorials)…

  1. I have a list shifter whose type is task list and source is Current User’s task lists
  2. I have a horizontal repeating group that show’s all of the user’s task lists from the list shifter’s shifted list
  3. Each cell in the task list RG has another list shifter for that cell’s tasks and feeds a vertical rg for displaying that list’s tasks
  4. Navigation arrows(buttons) are set up to swap adjacent lists (no big, shifter makes that easy – thanks!)
  5. When a swap occurs, the last step in that workflow is to replace the user’s task lists list with the shifter’s shifted list (this is what I think you are describing above)

Here’s a screenshot of the app preview if it helps to understand things…

However, even though the user’s task lists field is updated successfully (pretty sure), this does not save the current view. In other words, if the page is refreshed, the task list order goes back to the original, unshifted view.*

I suspect this is because replacing the user’s task lists field data with the shifter’s shifted list does not update the related/underlying task list thing (there’s no change to the modified date on the task list things) but I could be wrong.

Now, having watch your list popper screencast, I suspect I could do it that way but I’m not ready to move up to a paid account just yet. I would really like to solve this challenge w/o upgrading too early and w/o using a list order field (that’s problematic, as you have said).

Any help is much appreciated! And KUDOS on an excellent plugin…

First, wow. This is the most useful plugin I’ve found on Bubble to-date. Solves a whole, heaping bucket-load of problems and fulfills a dozen items on my Bubble wish list. And the time (and personality) you’ve put into the documentation and education resources is just so generous. Thank you, Keith. Still learning my way around List Shifter, but will definitely contribute something to the cause once I get a better handle on things. Quick question: Is there a central place where I can find all of the tutorial videos you’ve assembled? Thanks again! Hope you’re faring well in quarantine. :beers: :pray:

4 Likes

Anything that concerns List Shifter SHOULD be found in the thread above. My other “best of” videos can be found by searching #lockdownandlearnwithkeith

And sorry I’ve been scarce here — I have cool new things to share, but also have a client that’s keeping me super busy with non-Bubble work. (This is a blessing given the alternative of course, but it’s slowed progress on things like Reanimator…)

4 Likes

Thanks so much!

Keith, I know you’re swamped and might not see this for a bit, but I wanted to request a bit of help. I’ve been trying to build a simple filtered search page using List Shifter. The idea is to allow users to search posts by geolocation and then filter by tags, search range (distance) and sort method.

My filters are in a reusable, so I’m passing the filter inputs via URL parameter to the main search page and then using those values to trigger a List Shifter that iterates through and then merges a series of searches by tag. The idea was that LS provided a tidy way to clean up the otherwise messy business of filtering based on an unknown number of tag inputs. That said, the search is still buggy and I’m struggling to diagnose the problem.

You can see my setup in the screenshots below (as well as demo here). I’d be very grateful for any insights you’re willing to toss my way.

Thank you!

1 Like

Hi @keith,

I’m trying to use List Shifter to make some accounting for me.

But I’m getting stuck how to create custom lists based on stuff, create nested objects from this lists and maybe edit them on the browser before send to database.

Tried to follow some videos but didn’t found anything similar :confused:

  • I want to create a ‘bill’ object in my page both for expenses and revenue.

For example - Rent expense value R$ 1.000.

When I set the Rent, I need to schedule its rent, for example,

  • Schedule 01 - > 05 days after
  • Schedule 02 -> 35 days after
  • Schedule 03 -> 65 days after

And after that, save them into my database linked (e.g. the expenses should have its bill uniqueid linked)

Also, I’m trying to set up invoices with the same logic

For example, I sold a contract of R$ 3.000 with 3 invoices and a 5% transaction fee.

  • Invoice 01 should be R$ 950 date 05
  • Invoice 02 should be R$ 950 date 35
  • Invoice 03 should be R$ 950 date 65

(I split original value in 3 and discounted its transaction fee)

Any thoughts on this?

Thanks for everything!

2 Likes

Sorry for the slow response @ts11, if you’re doing a bunch of search constraints (or working out how best to do them) you might find this interesting:

Additionally, have you noticed that List Shifter has a Sort action? (That can sort using criteria that would otherwise be impossible to construct in Bubble.) The best description of this is here (you kinda need to read the whole thread as my response is in several parts):

1 Like

Thank you thank you thank you! I’ll digest these ASAP. They look like they’ll be very instructive for me.

Hi @keith, extremely powerful plugin, thank you so much!

Running into a weird issue, I must be doing something silly. I’m trying to swap two items in a list and save that updated list into the database. Seems to work fine but doesn’t survive page refresh, for some reason.

I have my RG displaying the list as ordered in the database.

The ListShift element is taking the same list, also from the database:

My workflow is swapping the current cell’s item and the one below it.

And then I save the shifted list into the database.

I wasn’t sure the second step of the workflow would wait for the first one to finish, but it all seems to work well. When I execute the workflow, the list displayed in the RG (read from the database) changes accordingly.

But if I refresh the page, I see the original list, not the updated one.

Any idea what is going wrong?

Here is quick video that shows the issue on a test page:

https://www.loom.com/share/aa8ba405f4df4dbfa35c15da56356846

Hi @keith ,
Thanks for the awesome plugin, I’m trying to use it to do something similar to your “interleaving two lists” example but am having a bit of an issue.

In my app I have have a a “thing” called Meal that contains a list of Food (another "thing).
I have a text box where I want to show the list Food Names and whether or not that Food is a Favorite.

I setup one List Shifter to pull the list of Food Names, and another List Shifter to pull whether or not a Food is a Favorite formatted as text with a “heart” icon if the value is “yes”, and null if the value is “no”. I now want to interweave these two so that it will look like this: Food Name 1 (“heart”), Food Name 2, Food Name 3 (“heart”).

The error I’m getting is that the text box won’t accept the value of the List Shifter Processed List…it’s giving me an error of “Dynamic Data in text boxes must be printable as text, but instead this is a non text expression” but all 3 lists to shift are set as “text”.

Here is a link to my editor: Plan My Meals Editor

Appreciate any help you can provide!

@keith hi keith, the issue with the customlist clearing and being set to empty isnt working properly again. WF 1- I set a custom list to hold 2 items. (this list is inside of a reuseable element. WF 2 i hide the Reuseable element in step 1 and show then next reuseable element. I then go to reset the list of item (set in wf1) to empty, using a custom wf. I first show the initial reusable element then use a custom wf to clear the list. in the workflow the customlist shows a empty value list… but when i inspect the same list. it shows the 2 items in the list instead of a clear empty list. is this because the list is within a reuseable element??