I don’t know if anyone can help - I’ve been through many tutorials on this and I’ve noticed flaws in the solutions I’m finding.
I’m trying to allow users to change the order of items in a repeating group - which has been suggested that I have an"Order" field on the item and have the repeating group sort by this field.
It works - BUT - if the user is too quick and double clicks or triple clicks etc, the workflow / server load time seems to be too slow to catch up and it messes up the order numbers or just decides not to work at all.
Has anyone figured out a way to reorder a Repeating Group using states so the results happen instantly in the browser and then uploads the changes to the back end?
You really don’t need to have an “order” field. You could sort a repeating group using your current and/or different fields. As long as they are something that is used for filtering e.g. date created, numbers, etc. basically something measurable.
There are a also a handful of factors that affect a repeating group’s speed. To name a few, it can be your data type, how you structured your search, the elements in a repeating group, size, the use of styles, etc.
If you wish to filter a repeating group REALLY FAST, I suggest you checkout the Daisy Chain Filtering Method. Here’s a loom video of how it works. Credits to one of the most awesome bubble devs https://twitter.com/Andrew_Vernon
Just wanted to come back to this one for anyone that was struggling with something similar…
I did use the daisy chain method-ish (thanks @ntabs )… but instead of daisy-chaining API workflows like in the video example, I daisy chained via custom states so that the events would happen instantly in the users browser.
I set 5 custom states dependent on whether the item is moving up or down:
• List from beginning until the 1or 2 before cell user clicks on
• Cell user clicks on
• Cell before/after user clicks on
• List from 1 or 2 after cell user clicks on until end of list
• New order of list
Populate the data you need into the first 4 custom states, then build the new list in the 5th new order custom state and set your Repeating Group to read from the new order.
I hope that makes sense - hopefully a combination of watching the video and reading this will click things into place.