# Showcase: Script to save drag-drop sort order in views

**URL:** <https://community.fibery.io/t/showcase-script-to-save-drag-drop-sort-order-in-views/7974>\
**Category:** Fibery Showcase\
**Created:** [December 16, 2024, 6:48pm UTC](https://community.fibery.io/t/showcase-script-to-save-drag-drop-sort-order-in-views/7974 "2024-12-16T18:48:34Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Chr1sG](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/chr1sg/32/3941_2.png) [@Chr1sG](https://community.fibery.io/u/Chr1sG)\
**Post date:** [December 16, 2024, 7:01pm UTC](https://community.fibery.io/t/showcase-script-to-save-drag-drop-sort-order-in-views/7974/2 "2024-12-16T19:01:11Z")

</div>

For reference, in some cases, a formula can be used to get the rank order of items (within a collection):

> [@Formula to assign number based on sorting](https://community.fibery.io/t/formula-to-assign-number-based-on-sorting/3652/5):
>
> I don’t know why it took me so long to figure out a more elegant solution to this, but here is an example of a formula that will tell you the relative position of a Task entity amongst all the Tasks related to a common parent Project: (Find(Project.Tasks.Sort([Start Date]).Join("#" + Right("000" + [Public Id], 4), ""),"#" + Right("000" + [Public Id], 4)) + 4) / 5 In this example, the position is given for items based on their start date, but it can equally be used to get the position of items…

---

_[View the full topic](https://community.fibery.io/t/showcase-script-to-save-drag-drop-sort-order-in-views/7974)._
