SOLVED

Sorting button in Power App

Copper Contributor

I have built a simple Power App with SharePoint List as the data source. Within the BrowseGallery I want to be able to sort by Date. Currently sorting is tied to Title. Code is:  SortByColumns(Filter([@'PowerNinja TalkSchedule'],StartsWith(Speaker,TextSearchBox1.Text)),"Title",If(SortDescending1,Descending,Ascending)). 

If I change "Title" to "Date" the BrowseGallery goes blank. Guidance is appreciated. 

4 Replies
What column are you using? You need to make sure it matches. So as created or modified or is it a custom column named Date? I think that’s a reserved name so not sure if your using that just as an example.
Thank you for the reply Chris. Yes to your question (which I should have included initially) Date is the name of the column I created and would like to be able to sort within the Power App - chronological order by date . Thank you.
best response confirmed by JCamp (Copper Contributor)
Solution
It should work then. Are you getting any errors? Need to go into your list > List settings > date column, and see what the actual column name is, it's at the end of the url. Make sure it doesn't have any special naming cause you have to use the system name to sort not just the display name, so if you renamed it for example, the original name might be different.

@Chris Webb thank you. I think this is the issue. The column is named "Date" but is named within the URL as "Event Date" - I changed this column naming and didn't realise the impact. Thanks again. 

1 best response

Accepted Solutions
best response confirmed by JCamp (Copper Contributor)
Solution
It should work then. Are you getting any errors? Need to go into your list > List settings > date column, and see what the actual column name is, it's at the end of the url. Make sure it doesn't have any special naming cause you have to use the system name to sort not just the display name, so if you renamed it for example, the original name might be different.

View solution in original post