List sort toggle (ascending/descending) in a single list

The following outlines the steps I went through to dynamically sort a list ascending and descending. This seemed ridiculously complicated for such a simple task (I do apologise for the length). Other solutions warmly welcomed.

Glide Sort Toggle – Full Step-by-Step Setup

This document details the full process to turn a static Ascending list into a dynamic toggle that allows switching between Ascending and Descending order in Glide. It includes all steps, workarounds, and reasons for certain choices – the ‘epic saga’ version.

Starting point

A list of orders in Glide sorted Ascending by Time Stamp.

Create a Boolean column to store sort preference

• Table: Users (so each user can have their own sort setting)
• Column name: Sort Desc
• Type: Boolean (checkbox)
• Holds TRUE if user wants descending sort, FALSE if ascending.

Duplicate your Orders list

• One tab/component for Ascending:

  • Sort by Time Stamp Ascending
  • Visibility: Sort Desc is NOT checked
    • One tab/component for Descending:
  • Sort by Time Stamp Descending
  • Visibility: Sort Desc is checked

Create a computed column to ‘flip’ the Boolean

• Table: Users
• Column name: Not Sort Desc
• Type: If–Then–Else

  • If Sort Desc is 1 → Output 0
  • Else → Output 1
    • Lets us write the opposite value to Sort Desc when user clicks a toggle.

Add the toggle button

• On Orders screen, add a Button component
• Label: ‘Sort’ (with an up/down arrow icon)
• Action: Set Column Values

  • Row: User Profile (signed-in user row, not a relation)
  • Set: Sort Desc = Not Sort Desc
    • Clicking the button flips the sort direction.

Test

• Click button → Sort Desc flips
• Glide instantly switches visible list between Ascending and Descending.

(Optional) Dynamic labelling

• In Users table, create an If-Then-Else column:

• Call it Sort Label
IF Sort Desc is checked THEN ‘Newest first’ ELSE ‘Oldest first’
• Use Sort Label as the button label so it changes with sort direction.

Compact (but honest) summary:
Add a user-specific Boolean (`Sort Desc`), duplicate the list for ASC/DESC, build a relation to the current user, then wire a button to flip it — while battling Glide’s UI quirks, disappearing buttons, and the occasional existential crisis. :joy:

Why it was tricky

• The Set Column Values action won’t let you update another table unless you target a specific row (User Profile) instead of a relation.
• Visibility conditions on the lists must exactly match the Boolean’s true/false state.
• Glide doesn’t have a built-in ‘sort toggle’ action – this was a manual workaround.

Thanks for your feedback

Mark