Forum Discussion
JCamp
Aug 25, 2020Copper Contributor
Sorting button in Power App
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.
- 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.
- 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.
- JCampCopper ContributorThank 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.
- 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.
- JCampCopper Contributor
ChrisWebbTech 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.