Announcements
Hi
I am creating a Gantt chart which is fed form multiple lines of a SP list. Is there a way to sort the items in the gallery so that all lines in the list which have the same first column name are shown underneath each other? For example, let's say I have a line with the job column as "Job 1" and then I have another line with "Job 2" and then another with "Job 1" again - can I sort them so that the gallery shows both lines with "Job 1" first and then "Job 2" is then shown underneath?
Many thanks.
in your items property of the gallery you can just "Sort" like this:
Sort(myItems,Job,Ascending)
where "myItems" should be replaced with your SP list name & "Job" with the SP column name
Did this answer help you in any way? Consider to "Accept as Solution" and give a "Thumbs Up"
Many thanks!
Is there a way to do with a collection? I am also applying a filter to the Gallery which filters the items shown based on the same column and whether they are selected. So basically, I want to be able to select whether the main job is shown at all and then if selected, sort all of the lines together by the job column?
This is what I currently have in the ITEMS of the Gallery, where colTasks is the collection and ProjectID is the job identifier.galProjectList is another gallery which lists all of the jobs available to view and chkPLIsSelected is the button to select the job.
Filter(colTasks,ProjectId in Filter (galProjectList.AllItems,chkPLIsSelected.Value - true).Result
So if more than one job is selected, I also then need to sort what is shown by the ProjectID.
Evaluation works from the inside out. So yes, you can apply a sort just as easily
would become
Sort(Filter(colTasks,ProjectId in Filter (galProjectList.AllItems,chkPLIsSelected.Value - true).Result,COLUMNTOSORT,Ascending/Descending)
Brilliant - I'll give it ago!
Thank you.
Thank you so much - I just needed to add a bracket after "RESULT". Worked a treat.
Would I also be able to incorporate a second check box gallery so that I could just select all of the same lines. For example, say two jobs each have a line called "task 1" and "task 2", I'd like to be able to choose to show all "task 1s" only.
I think I just need to put another filter inside the existing filter?
that's correct, just as long as you remember they work from the inside out you can create as many filters as you like. Don't overkill it though, it makes things slower
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
Congratulations to our 2026 Super Users!
Congratulations to our 2025 community superstars!
These are the community rock stars!
Stay up to date on forum activity by subscribing.
11manish 547
WarrenBelz 444 Most Valuable Professional
Valantis 322