Drag and drop reordering of records in deck view

Anyway to accomplish this? I’d love to be able to do a “simple” drag and drop to custom order the records in a deck view.

Any way to do this in another view, like a table? I was just using my app and thought of this. Haven’t tried anything yet.

Appreciate any ideas. Thanks.

1 Like

There is no drag and drop interaction available in Appsheet to change the row orders, but you could do move up and down selected row by Appsheet Action, as far as I know.

3 Likes

that’s what I did but it would be nice to have this feature drag and drop reordering out of the box.

2 Likes

Alex,

So did you have a column for sort order that the actions increased or decreased the value of? Did you have an action for move up and another for move down? Would you mind sharing a screenshot and your actions? You can DM if you want.

Lucinda

Yes, an Order column.

Here’s the first action:

The code in setting up the value of the Order. I copied and updated the code from another post in this forum.

Class_Card_OrderUp
IF(COUNT(SELECT(Class_Cards[Order], AND([Class_Board]=[_THISROW].[Class_Board], [Order]<[_THISROW].[Order])))<2,
   IF(COUNT(SELECT(Class_Cards[Order], AND([Class_Board]=[_THISROW].[Class_Board], [Order]<[_THISROW].[Order])))=0,
      [Order],
      ANY(SELECT(Class_Cards[Order], AND([Class_Board]=[_THISROW].[Class_Board], [Order]<[_THISROW].[Order])))-1
   ),
   (INDEX(SORT(SELECT(Class_Cards[Order], AND([Class_Board]=[_THISROW].[Class_Board], [Order]<[_THISROW].[Order])),TRUE),1)+
   INDEX(SORT(SELECT(Class_Cards[Order], AND([Class_Board]=[_THISROW].[Class_Board], [Order]<[_THISROW].[Order])),TRUE),2))/2
)

Class_Card_OrderDown
IF(COUNT(SELECT(Class_Cards[Order], AND([Class_Board]=[_THISROW].[Class_Board], [Order]>[_THISROW].[Order])))<2,
   IF(COUNT(SELECT(Class_Cards[Order], AND([Class_Board]=[_THISROW].[Class_Board], [Order]>[_THISROW].[Order])))=0,
      [Order],
      ANY(SELECT(Class_Cards[Order], AND([Class_Board]=[_THISROW].[Class_Board], [Order]>[_THISROW].[Order])))+1
   ),
   (INDEX(SORT(SELECT(Class_Cards[Order], AND([Class_Board]=[_THISROW].[Class_Board], [Order]>[_THISROW].[Order]))),1)+
   INDEX(SORT(SELECT(Class_Cards[Order], AND([Class_Board]=[_THISROW].[Class_Board], [Order]>[_THISROW].[Order]))),2))/2
)

Condition to display Class_Card_OrderUp action:
COUNT(SELECT(Class_Cards[Order], AND([Class_Board]=[_THISROW].[Class_Board], [Order]<[_THISROW].[Order], [Key]<>[_THISROW].[Key])))<>0

Condition to display Class_Card_OrderDown action:
COUNT(SELECT(Class_Cards[Order], AND([Class_Board]=[_THISROW].[Class_Board], [Order]>[_THISROW].[Order], [Key]<>[_THISROW].[Key])))<>0
2 Likes

Thank you so much Alex for sharing this.

1 Like