cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Populate Dropdown based off another Dropdown Values

How to achieve using of the switch condition only 1 st condition I'm getting 

RajSaha__0-1610734627111.png
using of the the below condition only I'm getting 1st option 
Switch(
DataCardValue1.Selected.Value,
"Assurance",{Value:"Canada"},
"Assurance",{Value:"Real Estate"},
"US-Central",{Value:"Southeast"},
"US-Central",{Value:"Central"},
"US-East",{Value:"Northeast"},
"US-West",{Value:"West"},
"US-West",{Value:"Southeast"},
"US-PBT",{Value:"OTC"}
)

RajSaha__2-1610734851948.png


I need output if I chose the "Assurance" in the 2nd dropdown I'm able to see "Canada" & "Real Estate" 

 

 

2 ACCEPTED SOLUTIONS

Accepted Solutions
RandyHayes
Super User
Super User

@Anonymous 

This is because Switch will stop evaluating the conditions once one condition is met.  So the subsequent US-Central item in your formula will never be evaluated.

 

Please consider changing your Formula to the following:

Switch(DataCardValue1.Selected.Value,
    "Assurance",["Canada", "Real Estate"],
    "US-Central", ["Southeast", "Central"],
    "US-East",["Northeast"],
    "US-West",["West", "Southeast"],
    "US-PBT",["OTC"]
)

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.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
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

Anonymous
Not applicable

@RandyHayes Thank you so much for quick solution 🙂😉

View solution in original post

2 REPLIES 2
RandyHayes
Super User
Super User

@Anonymous 

This is because Switch will stop evaluating the conditions once one condition is met.  So the subsequent US-Central item in your formula will never be evaluated.

 

Please consider changing your Formula to the following:

Switch(DataCardValue1.Selected.Value,
    "Assurance",["Canada", "Real Estate"],
    "US-Central", ["Southeast", "Central"],
    "US-East",["Northeast"],
    "US-West",["West", "Southeast"],
    "US-PBT",["OTC"]
)

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.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

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

@RandyHayes Thank you so much for quick solution 🙂😉

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (3,904)