I am trying to sort my sharepoint list, which is within my powerapp, by time and date to show the nearest date and time first and the furthest last. The list is sorted fine in sharepoint but that does not transfer over when I have added to my powerapp.
The attached file, Timetables.jpg, shows an overview of my app.
As you can see; there is a random date 20/9/2019 in the middle of the list, there is a date that should technically be displayed first at the bottom of the list and the times are not ordered.
The browse gallery formula is: SortByColumns(Filter('Music Timetables', StartsWith('Student Name', TextSearchBox1.Text)), "Title", If(SortDescending1, Descending, Ascending))
The list is called 'Music Timetables' and the columns shown are (in order L-R): Lesson Time, Student, Calculate date Formula, Calculated Time Formulae, Teacher
The column that I want to sort by is the first column (ThisItem.'Lesson Time'). When sorted this column will be hidden/invisible and the seperate date and time will be shown (3rd and 4th columns from the left).
How would I sort the order of items by this column? I have tried everything that I can think of but with no joy!
Sorry if this makes no sense. I can try and explain further if required. Im still new to powerapps!
Solved! Go to Solution.
I think you just have to modify the Items property of your Gallery so that it sorts by your 'lesson time' column. The formula would look like this:
StartsWith('Student Name', TextSearchBox1.Text)),
Hi @timl ,
Thanks for your suggestion. I tried this and my data just disappears and brings up lots of formula errors.
The title of the column seems to be: ThisItem.'Lesson Time'. Would this change anything?
Is it something to do with TextSearchBox1.Text? I have hidden the text search box and sort up/down functions and refresh etc as these arent required by front end users. They are still there but just hidden.
Im really at a loss as to why the colum isnt sorting easily!
Thank you for your response. I finally managed to sort this by completely changing the formula to:
Sort('Music Timetables', 'Lesson Time',Ascending )
This seems to have had the desired affect.
I do now have another question which is, How would I now sort the same column to show only items for todays date?
So for example; On a monday, list entries that apply to Monday would be the only items that show on a Monday.
The column that I want to sort this from is: ThisItem.'Lesson Time'
Thank you for your help!
Read the announcement for more information!
Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.
Features releasing from October 2019 through March 2020
Innovate, Collaborate, Grow - The top training and networking event across the globe for Microsoft Business Applications