↕ [Update Apr 28] - Sortable RG Drag & Drop plugin by EzCode

LOve it!!

1 Like

Thank you so much, this plugin is a gamechanger for me!

1 Like

My new favorite plugin

3 Likes

Hey Andrew, thank you so much, first of all.

So I made a quick test and it works to use Sortable to reorder items in a RG, but ONLY if those items are resulting from a (filtered) search. For example: Search for Folders created by Current User condition: field “Parent” is empty.

And then, I can successfully save the NEW ORDER to a particular field in the database. In this example, the field I save to is on the User object and it’s called “Folders”.

This is great. However, what I need to be able to do is actually load the RG’s data source with this expression: Current User’s Folders. This is not a search, but actually accessing a field that is a list.

The plugin currently doesn’t work if we load in a list like this, that is NOT resulting from a search?

Is this what you mean by " In the next update we will ad the feature to save the entire reordered DataBase. Still working on it." ? Actually not sure exactly what you mean here…

Because in a production scenario, I wouldn’t want to modify the Folders database because hopefully it would contains thousands of folders from many different users. So if I can only load the RG data source from a search, that’s not going to show me the saved order (which is present within the modified field “Folders” on the User object).

Hope that makes sense! Will it be possible to let Sortable act upon RGs whose data sources are actually a list (stored in a field), instead of from a search?

Let me know if I just missed something or could be using the plugin incorrectly. Thank you so much!

I think I might found a bug. The plugin stops working if I filter search based on other object. For example:

I have an object Block. This block has object Workshop in it.
If in my RG I search for all the blocks that have “parent group’s workshop” as workshop, it stops working.

If that’s true, makes it quite unusable. Otherwise awesome plugin :slight_smile:

Where does the plugin store it’s sorting? I’d like to access location data from other places.

Or is it possible maybe to turn off plugin database sorting? If I’d like to handle sorting myself.

Hi, thanks for detailed question, first I will answer to your last question,
The RG can have the data source a list stored in a field and that can be reordered and saved back to DB, this feature was added in the latest update from yesterday, please take a look in the demo editor see the example with the title Save reordered field list in DB

For rest of your questions, we will investigate that and will return to you with a response.

Regards, Andrew.

The plugin saves order in the browser localstorage, it does not save it in the DataBase, it is turned off by default.

Currently if you want to save the order in DataBase you can use the action Save sorted DB field list but this works only if the source of your repeating group is a field of list type from DataBase thing.
Please see an example in our demo

Hey Andrew, I made a quick loom screen-capture video to provide some more clarity on the issue with setting the data source from a field rather than a search:

In your plugin example, the data source is still being set from a Search, right? yes, the Search is accessing a particular field, but it’s still a Search: Search for Testsss fields item#4’s markets.

I’m wondering if it’ll be possible to use Sortable plugin on a Repeating Group where the data source is just a field, that’s NOT found by search.

I guess I could just do “Search for user whose unique id is Current user’s unique id’s Folders”, but it would be a lot simpler if I could just use the data source as Current User’s Folders (the field Folders, which is a list)

Also I think maybe I found a bug? At the end of the video, you can see that one of the data records disappeared! This really happened. I checked my database, and that record had been removed from the Current User’s Folders list field.

I have the “Remove from DB mode” UNCHECKED in both RGs in this example. However, the plugin throws a JS error if a DB is not supplied to the “Database to Remove” field, so I did have a Database to remove field supplied. However, I don’t think that has anything to do with the bug, because the Folder was not deleted or anything. It still exists as an object inside the Folders database. It was simply removed from the Current User’s Folders field.

Sorry if that’s very confusing. Hope this is helpful and let me know if anything is unclear.

Thanks!

3 Likes

Thanks for the video, it really helped to understand what is happening and I think I see where is the problem but let’s resolve it in the PM, I wrote you there.

@ezdev Would it be possible to have an option to have sorting disabled by default?
It would be even better If instead of a toggle, we could have separate workflows for “on” and “off” I’d like to have it off on page load and enable it with a button.

I have tried toggling the disable on page load, but it does not work because the element is loaded before the workflow is run.

Thank you so much for everything you’ve done so far! I feel like this is going to end up being one of the most used plugins.

1 Like

@alexsstockton sounds like a good feature, thanks for the idea, I will do a small update with this feature.

1 Like

I was attempting to use this to sort more complex objects, represented by groups that also had buttons defined on them.

Unfortunately, after I use the “Save to DB” Option, the objects in the repeating group can no longer be interacted with. The buttons in the group all stop working.

Is your repeating group source a list field from data base ? Also can you provide a link where you are testing so we can investigate it ?

I’ll see if I can replicate the issue in a simple test page and send it your way

Awesome work - thank you for updating this plugin - we think we will end up using this a lot

Just to check, I tested via our app, and it seems if the list is not text, i.e list of table entries instead, the new sort order is not saved. Any suggestions or is this planned?

1 Like

OMG! This plugin is AMAZING. @ezdev your a star. Best money I’ve spent on a plugin this year. Thanks Very much.

2 Likes

Is there a one-time price for this plugin, or only a monthly fee?

@ezdev did you manage to get a list of table entries to work or is it still just a nested list? Just detecting where the item is dropped - i.e dropped on element id should suffice. Happy to sponsor - just PM me