Reorder Lists by Drag and Drop
Devin Rossey
PLEASE! This is a MUST!
S
Steve Toth
Bump also. It is currently next to impossible to build dynamic sorting and filters in Adalo, which would be an important feature for any sort of app with extensive lists.
C
Cyril Vanlerberghe
Drag and drop or something that user friendly. Arrows to move item up or down for example.
Also, very important is that the is a filter in the sorting logic.
Right now, when I go around this missing feature, I manage to allow user to move items and place them in a specific place in my list by giving him a number.
However, when my user create a new list with the same items and place the item in a different place, then the item's number changed which make the change in the 1st list as well.
Exemple :
List 1 : Item A is in 2nd place.
List 2 : Item A needs to be in 4th place. I changed his sorting number with 4 (instead of 2).
Problem : Item A moves to place 4 in list 1.
We need a feature where there is a filter in the sorting logic to be able to save different position of the item in different lists.
Kevin Goodspeed
Any movement on this? A common use-case for Adalo is building project management-related apps, for which this would be obvious functionality/table stakes.
David Tobey
I have partially solved this, but with two flaws. (1) User clicks up and down arrows instead of drag and drop (I can live with that for now, but it works). (2) The other flaw is that it only works 4 out of 5 times on average. The times it doesn't work are inexplicable and likely due to some Adalo lag or bug.
In short, the solution is as follows:
1: Create two variables (in user or form field). One is an ordinal value that starts with "1" and will increment each time the process iterates. The other variable is a random key that can be used to track which items in your list you have acted upon or not.
2: In the record, there is an ordinal value that gets set when the record is created. Simply count the existing records and add one. This way, all your records are numbered 1,2,3 etc. Also, create a filed in each record to store the random key, when used (later step).
3: Sort the list by this ordinal.
4: Provide up and down arrows within the list display.
5: For the arrows you would reset the two vars you created in step one. Set the key to something random and set the ordinal to 1. Also, upon clicking the arrow, change the current record's value like this: The up arrow will subtract 1.5 and the down arrow will add 1.5. This will instantly reorder the records! However it will only work the first time as any subsequent re-orders may fail if the numbers are not cleanly 1,2,3 etc. So we need to re-number the ordinal with good clean integers. So...
6: Link to another page.
7: On that page, show the list of the records. Filter and sort it the same way that it is on the first page, but add another filter to show only those records who do NOT have the current key yet (means they haven't been acted upon). The list will also be limited to one record at a time and set to auto-refresh. This is important.
8: Then for each item in the list, add a timer component. Set the time to one second (or possibly zero will work) and set the action (when reaching zero) to do the following: Set the current record's ordinal to the ordinal var (from above). Set the current record's key to match the current key. Then increment the ordinal var by one and save it (t the field or user var) so that it's one number higher for the next iteration.
9: At this point, the list will auto-refresh because by changing the key will make the current record drop out, and the next record will appear. Each time it sees a new record, the timer action will update it's ordinal to the next value and refresh until all records have been re-numbered.
10: Finally, you can have a back-link that will only execute when the total number of records expected is equal to the number of records with the key. This means all appropriate records have been acted upon, so end the madness and return to where the user came from.
11: As for the display, once it's working, you can hide the counter and any other component in the list by changing the color to match the background or something. Then put something on the page like a spinner or interstitial ad so that the user is not faced with strange behavior while it is happening. It could take a few seconds to fully execute.
Now, I will tell you that I have done the above and it works great. It actually works. But every so often, it doesn't work. When it doesn't work, it's because step 8 above fails to fully execute on one of the records. So I can see it just refreshing itself over and over. Sometimes if I wait long enough, it will work. Other times, it just keeps blinking and never completes. This is why I tried both storing the key and ordinal in the user record AND on a field on the screen. Neither seems to make a difference.
I know it works because it works most of the time. But the times that it doesn't work means there is something with Adalo that is failing and I have no way of troubleshooting this.
Ideally, all the things that happen behind the scenes are a good foundation for a custom component. In fact, I can even imagine drag and drop instead of buttons. Despite this long post, the solution is quite simple.
I'd love for someone at Adalo to figure out the bug that is causing my solution to fail. Plus, it would be great if something like this was added as a component or list feature. My solution proves it's possible. Now I need someone to help make this a reality.
J
Joe Kardon
David Tobey: Can you make a loom or something for this? I'm getting a little lost, but love the ingenuity!
K
Katy Donahue
Ben trying to find the in-app sorting request so i can upvote it, but couldn't get to it from your comment below and also couldn't find it with search!
K
Katy Donahue
This would be amazing, bumping it up!
Carlton Black
This would be AMAZING! I am currently working on an app where one of the features is building an estimate and I would like to be able to reorder list items in-app as a user.
J Steb
Bump... this would be a great list enhancement!
R
RD
Any update on this? Drag and Drop is standard now. When may this be available? Thank you!
Load More
→