Hi @midwestDataDad ,
Could you please share more details about your scenario? Which data source are you working on?
Assuming that you are working on SharePoint list. You could find that OnSelect of the sort button is:
UpdateContext({SortDescending: !SortDescending})
This update context means each click of this button would return the opposite result. Refer to below official doc about update context:
https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-updatecontext#syntax
Then if you created the app through “Start from data”, then from SharePoint list, the Items of the Gallery would be like:
SortByColumns(Filter(ListName,StartsWith(ColumnName,TextSearchBox.Text)), "Column Name for sorting",If(SortDescending,Descending,Ascending))
So if you would like to sort by creation date, then modify this formula to below since “Created” is the column name of creation date:
SortByColumns(Filter(ListName,StartsWith(ColumnName,TextSearchBox.Text)), "Created",If(SortDescending,Descending,Ascending))
And if the data source is Dataverse, column name of creation date is “Created On”, you will need to replace it with "Created".
Please refer to below doc about Sort and SortByColumns functions:
https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-sort
Hope this helps.
Best regards,
Community Support Team _ Jeffer Ni
If this post helps, then please consider Accept it as the solution to help the other members find it.