Showing results for 
Search instead for 
Did you mean: 
Helper I
Helper I

Listing Planner buckets by orderHint - not the same sequence as in Planner Plan

In my Planner plan in Teams I have 4 buckets in this order:

Greenshot 2019-12-16 17.35.10.png

In my PowerApp I have a Gallery and I want the buckets to be listed in the same order so i used the following function. Note the sequence is not the same as above, but if I use Excel to sort by orderHint, Excel agrees with the following sequence! But that is not what is in the Plan! Note that "Waiting" and "Completed" are swapped compared to Teams.

Greenshot 2019-12-16 18.13.14.png



Any ideas?




Helper I
Helper I

PS: here is the table of orderHints, sorted Descending.

8586369754989763017P_To do


I have also run the query directly in the Graph Explorer to confirm the orderHint values and they are the same as above so my connector is returning the correct data. And, the sequence of records is the correct reverse order which seems is the default "sort order" ie Completed, Waiting, Started, To do.


If I do NOT attempt to sort the collection by simply running this:




the records are returned in the correct order (the same as the Graph Explorer results) mentioned above: Completed, Waiting, Started, To do.


So, SortByColumns() on the orderHint sorts in the "correct" collating sequence as verified by sorting them in Excel, but that order is NOT the reverse of the sequence returned by Graph (or my connector).


All I want to do is list my buckets in the same sequence as they appear (left to right) in the Plan.



Hi @murrah ,

Do you want to sort the table based on this order:Completed, Waiting, Started, To do

If so, I suggest you use Sort function instead of SortByColumns, because you could customize sort rule in Sort function.

Try this formula:

     If(name="Completed",1,name="Waiting",2,name="Started",3,name="To do",4),

Then the table will sort as this order:Completed, Waiting, Started, To do


Here's a doc about this function for your reference:




Best regards,


Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.


However, that does not address the underlying issue. For a start, it is not translatable to other Plans where the list of buckets will have different names. It will also break if a user changes the bucket name. 

The bucket record has an orderHint property. When you sort on that property it sorts/collates correctly (as far as I can see) but that sequence is not the same as the buckets appear in the Plan UI. Graph is returning the buckets in the correct DESC order. I just need to reverse that without resorting to copying the items to another collection in reverse order. I assumes the orderHint would do that but it seems not.


So, how do I get a list of buckets that is in the same sequence as that in the Plan UI? I need a solution that will work for any Plan, not something hard coded that will break.






Helpful resources

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

Power Apps Community Call

Power Apps Community Call- January

Mark your calendars and join us for the next Power Apps Community Call on January 20th, 8a PST

PP Bootcamp Carousel

Global Power Platform Bootcamp

Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.


Power Platform Community Conference On Demand

Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!

Top Solution Authors
Top Kudoed Authors
Users online (7,278)