web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Create Cascading Dropd...
Power Apps
Unanswered

Create Cascading Dropdown in Portal App

(0) ShareShare
ReportReport
Posted on by

I have 2 tables in my Dataverse.

The first table contains Country, State, and City details.

In the Second table's Form, I would like to display values based on Previous Selection.

 

Once a country is selected, have display only the state name that only belongs to the selected Country.

Once the State is Selected, Display the city names that belong to the selected State.

 

How to achieve this in a portal app?

Categories:
I have the same question (0)
  • Base2Rob Profile Picture
    76 on at

    There are a couple ways of going about this, and while this is not an exhaustive or copy/paste solution, it should hopefully get you started. Note this does not consider whether you are working with a portal app or canvas app, just general thinking on the problem.

     

    Also, without consideration for actual table relationships within Dataverse and assuming three tables, you could think about the problem this way (pseudo code only). You’ll need to deal with disambiguation, delegation, etc…

    Base2Rob_0-1641579047996.png

     

     

    If canvas, I would suggest using galleries (with viz true/false) for your pickers rather than dropdowns, but your call. Also, you may want to consider using the Address control, it’s very rich and fast.

     

    Also, rather than a filter, you might consider a ForAll to return the collection you need, but I'll defer to @RandyHayes on that idea...

     

    Additionally, I'm not sure where you're getting your data, but I use the data sets on this GitHub repo...Good Luck!!

  • RandyHayes Profile Picture
    76,297 Super User 2024 Season 1 on at

    @Base2Rob  Nice list!!  I'm going to keep that one in mind.

     

    @Anonymous 

    Not sure of all of your details for this, but in general, in a regular canvas app, the process would be this.  On your Country dropdown, the Items property would be:

    AddColumns(
     GroupBy(yourTable,
     "Country", "_records"
     ),
     "States", roupBy(_records, "State", "_cities")
    )

     

    Then the State dropdown Items property would be set to: CountryDropdown.Selected.States

    And the Cities dropdown Item property would be set to: StateDropdown.Selected._cities

     

    I hope this is helpful for you.

  • Community Power Platform Member Profile Picture
    on at

    Thank you for the response @RandyHayes . I don't want to implement the cascading dropdown in Canvas app.

     

    Instead I would like to implement the cascading dropdown in Portal app. Please share if you have any idea on it.

  • Community Power Platform Member Profile Picture
    on at

    Thank you for the response @Base2Rob  . I don't want to implement the cascading dropdown in Canvas app.

    I have a table with the details(Country, State and City). Instead of canvas, I would like to implement the cascading dropdown in Portal app. Please share if you have any idea on the portal app and how to implement this.

  • RandyHayes Profile Picture
    76,297 Super User 2024 Season 1 on at

    @Anonymous 

    I don't work with the Portal apps, but I cannot imagine that it is much different than the way they work in a canvas app.  Might be wrong, but it would seem odd to have it working differently.

  • Base2Rob Profile Picture
    76 on at

    @RandyHayes @Anonymous - you guys just gave me the excuse I've been waiting for to spin up a portal app in my tenant. I'll let you know what I learn!

  • RandyHayes Profile Picture
    76,297 Super User 2024 Season 1 on at

    @Base2Rob 

    Oh good!!  I was going to do the same, but looking at my backlog and worklog...it could be weeks before I got to it.

     

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.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 711 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 319 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard