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

Unable to Select dropdown item based on another dropdown item

I am building an application based on Employee Onboarding. I have mostly dropdown menu's on this form. I will just focus on two for this question: (1) Job Titles and (2) Laptop Needed. When HR fills this form and selects "Manager" from the first drop down, I want the second dropdown to auto-populate "Yes". 

 

Is this possible? If so . . .

 

1 - Where would the formula be placed, drop down 1 or drop down 2?

2 - What property would be best based on this situation, OnUpdate, Items, OnChange?

3 - How many drop down's can be updated based on the selection from drop down 1?

4 - Would the change be made on the DataCard or the DataCardValue?

1 ACCEPTED SOLUTION

Accepted Solutions
AutoSol
Frequent Visitor

Hey PowerAddict, 

 

I have the solution, the fix is in . . .

 

  • New Form Button: NewForm(EditForm1);Navigate(EditScreen1, ScreenTransition.None); Set(varJobTitle,"AccountsPayableSpecialist"); Set(var15FiveNeeded,["Yes","No"]);
  • Parent Card: Set(varJobTitle,DataCardValue15.Selected.Value)
  • Child Card: Switch(varJobTitle,"Accounts Payable Specialist",First(var15FiveNeeded))

Thanks for your assistance with this case. We have the solution. 

View solution in original post

5 REPLIES 5
PowerAddict
Super User II
Super User II

Yes this is definitely possible.

You can set the Default property of the 2nd dropdown to:
If(Dropdown1.Selected.Value = "Manager", "Yes")

Value might need to be replaced by another column name. Please check the suggestions that you see after you type in the dot. Also, depending on how you are setting the Items property of the 2nd dropdown, you might have to specify "Yes" in a slightly diff way.

You can update as many dropdowns as you want.

I would make these changes on DataCardValue.

Let me know if this helps.

---
If you like this reply, please give kudos. And if this solves your problem, please accept this reply as the solution. Thanks!

Hardit Bhatia
https://thepoweraddict.com

Hey PowerAddict, 

 

Thank you for the formula . . .What do you mean by, "Value might need to be replaced...?"

 

When I begin my IF statement, the name of the data card populates automatically. Once I begin to type ".selected.value", the query seems to stop, no auto-populated names appear. To target "selected.value", do I need to apply further configuration settings on the first drop down menu card?

 

For better reference, I will provide images of my situation. The Job Title card (screenshot) shows the card details, 15Five card (sreenshot) is where the "Yes/No" lives. The Job title card has all the titles. 

 

Job Title Card (Screenshot)Job Title Card (Screenshot)15Five Card Screenshot15Five Card Screenshot

 

Here is a demo screenshot of the job title and the field that needs to change . . . When Accounts Payable Specialist is selected, I need the 15Five card to populate Yes (yes/no options).

 

jobtitledemo.JPG

When I entered the formula, and select the job title (after a republish of app), nothing happens when selected. 

Here's my formula: If('Job Title_DataCard1' = "Accounts Payable Specialist", "Yes"). I also tried the ".selected.value" and nothing happens. 

 

Can you let me know where I'm going wrong @PowerAddict ?

 

I was telling to look at suggestions after typing .Selected. and not .Selected.Value

Can you please share the Items property of both your dropdowns?

---
If you like this reply, please give kudos. And if this solves your problem, please accept this reply as the solution. Thanks!

Hardit Bhatia
https://thepoweraddict.com

Job Title Items (1st dropdown)

jobtitleitmes.JPG

15Five dropdown

dropdown1items.JPG

I skipped ahead (thinking I have a better understanding), when I updated my formula, in the 15Five Default property, and republish, still no bueno . . . The value appeared automatically after I corrected the reference to Job Title card. 

formula2.JPG

 

AutoSol
Frequent Visitor

Hey PowerAddict, 

 

I have the solution, the fix is in . . .

 

  • New Form Button: NewForm(EditForm1);Navigate(EditScreen1, ScreenTransition.None); Set(varJobTitle,"AccountsPayableSpecialist"); Set(var15FiveNeeded,["Yes","No"]);
  • Parent Card: Set(varJobTitle,DataCardValue15.Selected.Value)
  • Child Card: Switch(varJobTitle,"Accounts Payable Specialist",First(var15FiveNeeded))

Thanks for your assistance with this case. We have the solution. 

View solution in original post

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Power Apps June 2021

June Power Apps Community Call

Don't miss the call this month on June 16th - 8a PDT

Top Solution Authors
Top Kudoed Authors
Users online (53,950)