# Sorting Supabase table views in WeWeb frontend

**URL:** <https://community.weweb.io/t/sorting-supabase-table-views-in-weweb-frontend/21684>\
**Category:** Ask us anything\
**Tags:** supabase\
**Created:** [October 12, 2026, 12:20am UTC](https://community.weweb.io/t/sorting-supabase-table-views-in-weweb-frontend/21684 "2026-10-12T00:20:13Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dan\_OOT](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/dan_oot/32/14475_2.png) [@Dan\_OOT](https://community.weweb.io/u/Dan_OOT)\
**Post date:** [October 12, 2026, 12:20am UTC](https://community.weweb.io/t/sorting-supabase-table-views-in-weweb-frontend/21684/1 "2026-10-12T00:20:13Z")

</div>

G’day mates,

So I’m hoping this is just a simple dumb thing I’ve missed, but I cannot for the life of me automate the sort order for a view of a table in WeWeb. I have a view of a table with two parameters setup, column name and sort order. The goal is when I click on the column header on the front end, it changes the column name to the clicked on column, and then will toggle between asc and desc.

 ![image](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/3X/c/e/ce5679af799cd4b959fa0a977e7d4c12b8e484ab.png)

So in the view, I have the parameters, and I have them hooked up to the sort function. The column name works perfectly. I can dynamically change that. However, I can’t get the sort order to trigger. The only way I’ve got that working is if Unbind it and manually change it. Now, I COULD set up two views one with sort order hard coded to desc and one to asc, and then switch between the views on the front end depending on which sort order is needed.

But obviously that’s not how it’s SUPPOSED to work.

 ![image](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/3X/7/8/78ca34c18d36558eae7aa90fd70487c76cabb4f6.png)

I’ve tried text parameters, inputting asc, Asc, ASC. I’ve tried bools, I’ve even tried setting it as a number and 1, 0, -1. None of those work.

I can’t find any documentation that says what the sort function is supposed to take in to change it. It just says “choose the order” [Views | Documentation](https://docs.weweb.io/database-and-apis/database/views.html#parameters)

 ![image](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/3X/2/a/2ae0a52a97786ae08a7b2bfd133e8b993ded1bb3.png)

Or simply that you have a sort functionality per here: [Supabase actions reference | Documentation](https://docs.weweb.io/integrations/supabase/actions-reference.html)

So I’m at a loss. If anyone can point out the hopefully super obvious step I’m missing, I’d greatly appreciate it.

---

<div class="post-metadata">

**Author:** ![jptrinh](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/jptrinh/32/1493_2.png) [@jptrinh](https://community.weweb.io/u/jptrinh)\
**Post date:** [October 12, 2026, 7:47am UTC](https://community.weweb.io/t/sorting-supabase-table-views-in-weweb-frontend/21684/2 "2026-10-12T07:47:15Z")

</div>

Hey @Dan_OOT 👋  
Can you show us what your workflow looks like on the column header?

---

<div class="post-metadata">

**Author:** ![Dan\_OOT](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/dan_oot/32/14475_2.png) [@Dan\_OOT](https://community.weweb.io/u/Dan_OOT)\
**Post date:** [October 12, 2026, 11:00pm UTC](https://community.weweb.io/t/sorting-supabase-table-views-in-weweb-frontend/21684/3 "2026-10-12T23:00:12Z")

</div>

Sure, I’m not sure it’s relevant at this point as I can’t even get it to work when using the test fields for the parameters on the table itself, but here’s the call that the workflow makes to the table. Each header clicked sends a hard-coded column header name, though I did turn it into a formula to try sending it in “” to make sure it went through as text.

 ![image](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/3X/6/9/6973803d24480ff5761910b4777653e1928183c7.png)

This is what I get back from running the Action (IDs truncated for posting here):

> {  
> “tableViewId”: “511e…”,  
> “parameters”: {  
> “7706…”: “invoice\_number”,  
> “cab5…”: “Desc”  
> }  
> }

However, after running it, I don’t see the parameters updated on the table.

 ![image](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/3X/f/8/f810417b726fd4f8a137cae6d7df6e8a8a3f525e.png)

Regardless, that’s another issue because I can’t even get sort order functioning when editing the parameters here:

 ![image](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/3X/c/d/cd8c4a6bd16bbc9c6b076b344f35955d170cb731.png)

And confirming that they do actually update the parameters and are feeding the information into the formulas for the sort function. Verified that changing the column name works and as I said earlier, if I unbind the sort order and manually change between asc/desc I can adjust the sort order correctly.
