How to keep the sorting order

Hi! I have a repeating group with tasks. They can be sorted by:
date ascending
date descending
importance number ascending
importance number descending

By default the sorting is date descending.

The sorting works fine. I was trying to keep the sorting order. This is how I did it:

  1. Created a state in a repeating group
    sorting_order_rg that has date descending as the default
  2. Created a workflow
  • Dropdown - Tasks Sorting In Progress’s value is changed
  • Set RepeatingGroup - Tasks In Progress
    state sorting_order_rg to
    value Dropdown - Tasks Sorting In Progress
  1. Set the default value of Dropdown - Tasks Sorting In Progress to
    RepeatingGroup - Tasks In Progress
    state sorting_order_rg

But it does not work as planned. I load a new page. Change the order from date descending to date ascending or another order. I refresh the page and the sorting order it still date descending. Have I done the functionality wrong? How can I fix it? Is there any way to make it work?

Thank you in advance!

1 Like

Custom states are temporary data, each refresh goes away. If you want to keep the load order persistent for the user try saving the value on the user under a value called “last sort order”


If you just need it for that particular session only, you can use browser local storage
it is one line JS code

localStorage.setItem('sort_order', value);
1 Like