Services Plugins FAQs

Drag & Drop to reorder RG updating wrong thing

Hello Team,

I have configured the plugin and it works perfectly except for one thing. The sort function updates the sort order of the wrong thing. I think it is updating the first thing it finds rather that the thing I just dragged.

Presumably its a problem in the workflow at the “change a thing” step.

Here’s an image of the workflow:

1 Like

Hello @kurt1 ,

Thanks for reaching out to us!

Regarding your question, your setup for saving the new order looks correct in the screenshot. However, please make sure you’ve set the Sort data and Things options accordingly in your element from the page:

For a detailed example, you can check our demo page editor, where there are many examples, please check the “Sorting Mode” funcitonality. We also recommend reviewing our documentation, where you’ll find additional information on plugin functionalities and examples, including two that demonstrate saving the sorted order:

Hope this information will prove helpful, please let me know how it goes or if you have any other questions.

I look forward to your response! :pray:

Best regards,
Support Team
Browse all Zeroqode Plugins for Bubble
Banner_Last3

OK, revisting this. Never did get it to work.

Here is the relevent setup.

Hi @kurt1,

Thank you for reaching out and the details provided.

Based on your workflow, the issue likely stems from how the sort order is being updated and saved.

Here’s what might be happening and some suggestions on how to resolve it:

  • In Step 1 of your workflow (“Make changes to jobs…”), you need to ensure that the “Thing to change” is specifically the item being dragged, not just the first item in the list. The current setup (“Search for JOBS:first item”) is likely why the wrong item is being updated.

  • To fix this, modify the “Thing to change” to reference the specific item being reordered. The Drag & Drop to Reorder RG Plugin provides a field called “This DraggableRG’s New Sort Of Item”, which contains the new order of items. However, you also need to identify the specific item being dragged.

  • Change the “Thing to change” in Step 1 to: “Search for JOBS: constrain by Unique ID = This DraggableRG’s New Sort Of Item’s Unique ID”.

  • Then, set the “Sort Order” field to “This DraggableRG’s New Sort Of Item’s Sort Order”.This ensures that the workflow updates the correct item in the database based on the Unique ID of the dragged item, rather than updating the first item in the list.

The Drag & Drop to Reorder RG Plugin documentation includes a demo page and examples for saving sort order. I recommend reviewing the “Sorting Mode” section, as it provides a detailed example of how to set up the workflow for saving the reordered list. Feel free to check the demo editor workflow to check the configuration of the sorting action.

You can also share a screenshot of the updated workflow or any error messages you encounter.

Best regards,
Support Team
Browse all Zeroqode Plugins for bubble
Banner_Last3

I still can’t get it to update the correct thing but I’ll look into that more later.

In any case, the updated sort order is weird. These numbers should be unique, right? I’m getting duplicate sort order values. See below. Is this an expected behaviour?

Cheers

Hi @kurt1,

Thanks for your update and for sharing the sort order values.

Regarding the duplicate sort order values, yes, ideally these should be unique to maintain a proper order. The Drag & Drop to Reorder RG plugin attempts to assign new sort orders based on the dragging operation, but duplicates can occur in some cases, especially if multiple items are moved quickly or if the sorting field isn’t set to increment uniquely.

To address this, you might consider:

  • Adding a workflow step to reassign unique sort order values to all items after the drag-and-drop action completes.
  • Using a numerical increment strategy (e.g., increment by 1) to ensure uniqueness.
  • Reviewing your data structure and constraints to avoid duplicates.

Feel free to share any error messages or screenshots for further assistance!

Best regards,
Support Team
Browse all Zeroqode Plugins for bubble
Banner_Last3

Hi @kurt1,

Just checking in to see if you had a chance to try adding a workflow step to reassign unique sort order values after the drag-and-drop action, or if you’ve looked into using a numerical increment strategy to prevent duplicates.

If you run into any issues or need help, please feel free to share any screenshots or error messages.

Looking forward to your update!

Regards,
Support Team
Browse all Zeroqode Plugins for bubble
Banner_Last3