cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
stubbo
Frequent Visitor

Cascading Drop-Down and Sort Order

Hi Folks -

 

Already found some great answers on here along the way so thank you, but I'm currently stuck with this...

 

We have some nice cascading drop-downs on a Power Apps form

 

Based on this article https://www.techmikael.com/2019/01/a-no-nonsense-solution-to-implement.html thanks Mikael 🙏

 

People choose a Business Unit, then relevant Team (connected to a SharePoint list named Team)... here's the form syntax:

 

ForAll(Filter(Team,BU.Id=BuSelector.Selected.Id),{Value:Title, Id:ID})

 

This was all fine until we had to add another item to the list, now in the drop-down for Team the additional list item appears at the end

 

We prefer the items to list alphabetically and have tried various Sort and SortByColumns options in the syntax but can't make it work

 

Does anybody have any suggestions?

 

Thanks, Jim

1 ACCEPTED SOLUTION

Accepted Solutions
RandyHayes
Super User
Super User

@stubbo 

Please consider changing your Formula to the following:

SortByColumns(
    ForAll(Filter(Team,BU.Id=BuSelector.Selected.Id),{Value:Title, Id:ID}),
    "Value"
)

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

View solution in original post

2 REPLIES 2
RandyHayes
Super User
Super User

@stubbo 

Please consider changing your Formula to the following:

SortByColumns(
    ForAll(Filter(Team,BU.Id=BuSelector.Selected.Id),{Value:Title, Id:ID}),
    "Value"
)

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

View solution in original post

stubbo
Frequent Visitor

Thanks Randy, really appreciate your time on this... your solution works perfectly 👍

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (2,110)