Moving columns in Kanban

Hi everyone, I am trying to add two small icons in the header of the stacks of the kanban so that I can move the column left or right. (there is a “sortable” switch, but it doesn’t seems to add this capacity)
Screenshot 2023-11-16 at 19.58.39

So I added two icons in the header and added a workflow on click to the icons so that the sort_index of the columns are changed accordingly. I first store the ids of the a variable

and then use that to select the right object to change the sort_index.


When I look at the log, everything is successful, but it doesn’t change the value in my Supabase table.

Any help would be appreciated.

You probably change the same record twice every time you run the workflow and since yo are referring only to element 1 and 2 (index 0 and 1) you always finish with the same value :slightly_smiling_face: This is my assumption as you did not share the formula for 'id" of the record.

I don’t think your method will work anyhow. Position of columns in Kanban depends on Stacks variable which is array of objects (example is based on Kanban fake data):

This variable should be bound to Stacks.

What I’m doing I’manipulating this variable to move the position of the objects within the array with a simple JavaScript (as a Formula so it can be reused)

Then bind the workflow separately for each arrow button (Left and Right):


(This is for right Button - for the left Button it should be - 1).

And that’s it. If you want to save the order into the database you can make a workflow for that and bind it to the Button - for example: save the view - this will limit api calls to Supabase.

There are probably other methods but I hope you catch the idea.

Thank you Dominic for your suggestion. I realised it was a RLS problem at the Supabase level. What I didn’t expect is that the operation was forbidden on the database but Weweb reported a successful operation in the log.
I didn’t try your suggestion yet but it looks neater than mine.

1 Like