Saw a ton of posts on this - for some reason I'm getting this error - what am I missing? Thanks

Saw a ton of posts on this - for some reason I'm getting this error - what am I missing? Thanks
Hello!
If I think what you are trying to do.
In your icon OnSelect place this formula:
If(
SortDescending,
UpdateContext({SortedItems: SortByColumns('DataSource', "YourColumn", SortOrder.Ascending)}),
UpdateContext({SortedItems: SortByColumns('DataSource', "YourColumn", SortOrder.Descending)})
);
UpdateContext({SortDescending: !SortDescending})
And in the gallery items:
SortedItems