I'm trying to add a sort to this syntax on the Item property of a gallery.
Current Syntax on Item
Filter(
'Org Chart',
'Reporting Manager' = Gallery3_1.Selected.Employee
I'm trying to add a sort based off of a column titled "Status" in descending order but it is not taking. Not sure what i'm doing wrong here. See below.
SortByColumns(Filter('Org Chart','Reporting Manager' = Gallery3_1.Selected.Employee)), "Status", descending)
this was the one that ended up working. Thank you.
Hi @punksterz626,
My apologies, I only now saw your response on the previous topic.
@Rusk's solution should do the trick 😊.
To add upon Rusk's answer: if the 'status' column is a choice column (no multi-select) you could use the following code:
Sort(
Filter(
'Org Chart',
'Reporting Manager' = Gallery3_1.Selected.Employee
),
Status.Value,
Descending
)
I hope this helps!
SortByColumns( Filter( 'Org Chart', 'Reporting Manager' = Gallery3_1.Selected.Employee ), "Status", Descending )
The main issue with the original formula was that the "Descending" argument was outside of the SortByColumns function's parentheses. In the corrected formula, "Descending" is included as a third argument within the parentheses, which tells Power Apps to sort the data in descending order based on the "Status" column.