# Challenge about reordering lists using drag and drop

**URL:** <https://forum.bubble.io/t/challenge-about-reordering-lists-using-drag-and-drop/6297>\
**Category:** Need help\
**Created:** [September 23, 2016, 8:02pm UTC](https://forum.bubble.io/t/challenge-about-reordering-lists-using-drag-and-drop/6297 "2016-09-23T20:02:26Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bradluffy](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/bradluffy/32/955_2.png) [@Bradluffy](https://forum.bubble.io/u/Bradluffy)\
**Post date:** [September 23, 2016, 8:02pm UTC](https://forum.bubble.io/t/challenge-about-reordering-lists-using-drag-and-drop/6297/1 "2016-09-23T20:02:27Z")

</div>

Ok so here is the challenge. I bought the trello tutorial which is very cool by the way. I am using the drag and drop and am trying to reorder a list based on where the droppable element is dropped. What formula or method can I use to change only the block being moved without having to make changes to other blocks, which slows everything down.

For example I have a list like so

A1  
A2  
A3  
B1  
B2  
B3

If I want to move B2 under A2 what workflow or formula can I use without making changes to the entire list?

Right now I have it set where it goes +.001 to the current number of the destination block. So when I drag B2 to A2 it adds .001 to B2 to make it fall under A2. But when I drag B3 under A2 it breaks it since both B2 and B3 have the same order value of A2+.001 . I have spent a day contemplating this and I am sure the answer is simple but it eludes me.

To change everything on the list would slow down the drag and drop so I don’t like this idea. I want an elegant solution the makes only a change to the block being moved.

Any thoughts would be greatly appreciated. Virtual keg for the most elegant solution:)

---

<div class="post-metadata">

**Author:** ![romanmg](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/romanmg/32/237672_2.png) [@romanmg](https://forum.bubble.io/u/romanmg)\
**Post date:** [September 23, 2016, 8:06pm UTC](https://forum.bubble.io/t/challenge-about-reordering-lists-using-drag-and-drop/6297/2 "2016-09-23T20:06:17Z")

</div>

I’ve seen this brought up a few times, and I’ve tried to figure it out as well. There are some solutions, but I haven’t seen anything that is all that clean yet. Will be following this thread…

---

<div class="post-metadata">

**Author:** ![Bradluffy](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/bradluffy/32/955_2.png) [@Bradluffy](https://forum.bubble.io/u/Bradluffy)\
**Post date:** [September 23, 2016, 8:10pm UTC](https://forum.bubble.io/t/challenge-about-reordering-lists-using-drag-and-drop/6297/3 "2016-09-23T20:10:36Z")

</div>

Yeah I am wondering if there can be a formula set up at the field level that changes the update value after every update. Then when something is dragged it uses a slightly different formula. Tried a few ways with this but none have worked so far. The answer is out there. We just have to wait for it:)

---

<div class="post-metadata">

**Author:** ![levon](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/levon/32/89793_2.png) [@levon](https://forum.bubble.io/u/levon)\
**Post date:** [September 24, 2016, 6:59pm UTC](https://forum.bubble.io/t/challenge-about-reordering-lists-using-drag-and-drop/6297/4 "2016-09-24T18:59:27Z")

</div>

Brad, actually we have that solution already in the trello clone. We have a sorting field for every task. By default it’s 1,2,3 etc.  
But when the task is moved between other tasks, let’s say which have sorting 2 and 3, then we simply sorting of 2.5 to the task which is moved (we take the average of the two), and this can work with infinitely small number as many times as you need the task to move. For example if it’s between 2 and 2.5 then the moved task will have sorting 2.25 so on.  
Does it make sense?

Thanks,  
Levon.  
 ![](https://us1.discourse-cdn.com/bubble/original/2X/0/0e27c966ced69bb42d00c2f85261d96fc8e34342.png)

Founder at Bubblewits - Bubble Certified Partner

> **[Zeroqode is a suite of no-code products and services for launching your ideas...](https://zeroqode.com)**
>
> No-code apps, plugins for Bubble, native apps builder and more. Now you can build apps without code even faster

[http://bubblestore.io](http://bubblestore.io) – a place to buy Bubble templates for landing pages, e-commerce, workflows, APIs etc.  
[http://iambubble.com](http://iambubble.com) - one page Bubble demo  
[http://builtonbubble.com](http://builtonbubble.com) - Collection of apps built on Bubble

---

<div class="post-metadata">

**Author:** ![Bradluffy](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/bradluffy/32/955_2.png) [@Bradluffy](https://forum.bubble.io/u/Bradluffy)\
**Post date:** [September 24, 2016, 11:49pm UTC](https://forum.bubble.io/t/challenge-about-reordering-lists-using-drag-and-drop/6297/5 "2016-09-24T23:49:34Z")

</div>

That is elegant!!! The formula in your trello app does does not seem to do this exactly or I am missing something. Awesome suggestion though. I just have to figure out how to write the expression exactly.

---

<div class="post-metadata">

**Author:** ![levon](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/levon/32/89793_2.png) [@levon](https://forum.bubble.io/u/levon)\
**Post date:** [September 25, 2016, 3:59pm UTC](https://forum.bubble.io/t/challenge-about-reordering-lists-using-drag-and-drop/6297/6 "2016-09-25T15:59:44Z")

</div>

In fact that’s exactly how it’s already configured in the Trello app, that’s how reordering of tasks works based on where you drop them 🙂 it may look a bit confusing at first but if you dig deeper you’ll see the idea 🙂

Thanks,  
Levon.  
 ![](https://us1.discourse-cdn.com/bubble/original/2X/0/0e27c966ced69bb42d00c2f85261d96fc8e34342.png)

Founder at Bubblewits - Bubble Certified Partner

> **[Zeroqode is a suite of no-code products and services for launching your ideas...](https://zeroqode.com)**
>
> No-code apps, plugins for Bubble, native apps builder and more. Now you can build apps without code even faster

[http://bubblestore.io](http://bubblestore.io) – a place to buy Bubble templates for landing pages, e-commerce, workflows, APIs etc.  
[http://iambubble.com](http://iambubble.com) - one page Bubble demo  
[http://builtonbubble.com](http://builtonbubble.com) - Collection of apps built on Bubble
