Sorting a table help

Hi there, new to WeWeb and really liking it so far. I’m trying to add a front end sort button to a table, and I can see there are a few guides in the forums but they’re mostly using a slightly out of date UI (I think?). It looks like there’s now a “sort” button built in.

What I’ve done:

I’ve created an icon that can change the variable sortbyemployees to either “Asc” or “Desc”. This seems to work when I click it (ie it toggles the variable back and forth)

Now if I go to my table and use the “Sort” button, I’ve set it to sort number_of_employees by the current value of sortbyemployees (ie Asc or Desc)

But when the variable changes the sort order does not. Sorry I can’t post more screenshots as a new user :frowning:

Any help would be greatly appreciated!

Try all uppercase: ASC and DESC

1 Like

Beautiful, worked like a charm. Thank you!

1 Like