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

How to create dependancy in 2 dropdowns

Dear,

I have 2 dependent dropdown list.

 

Dropdown 1

- A choice

- B choice

- C choice

Dropdown 2- manager approval status

- reviewing

- approved

- rejected

 

What I expected:

 when I select Choice C in dropdown 1, then the dropdown 2 will de default as Approved.

 

Much appreciated for your help in advance!!!

1 ACCEPTED SOLUTION

Accepted Solutions
v-xida-msft
Community Support
Community Support

Hi @Elliebai ,

Based on the issue that you mentioned, I think the second condition I mentioned above could achieve your needs.

 

I think you want to set default value within the Manager'a Approval ComboBox based on the selected value within the Item Chosen ComboBox, right?

 

I have made a test on my side, please consider take a try with the following workaround:

Set the DefaultSelectedItems property of the  Item Chosen ComboBox to following:

If(
   EditForm1.Mode = FormMode.New,
   If(
      ItemChosenComboBox.Selected.Value = "Choice C",  // please replace Choice C with actual Item option in your ItemChosen ComboBox
      {
        Value: "Approved"
      },
      Parent.Default
   ),
   Parent.Default
)

Note: The ItemChosenComboBox represents the ComboBox within the Item Chosen field data card, please replace it with actual ComboBox control name.

 

Please consider take a try with above solution, then check if the issue is solved.

 

Best regards,

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

View solution in original post

5 REPLIES 5
mdevaney
Super User III
Super User III

@Elliebai 
Put this code in the Default property of Dropdown2.

 

If(Dropdown1.Selected.Value="C Choice", "Approved")

 

If you need more than one result defined you can do this instead in the Default property of Dropdown2.

 

Switch(
   Dropdown1.Selected.Value,
   "Choice A", "Rejected",
   "Choice B", "Reviewing",
   "Choice C", "Approved"
)

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

v-xida-msft
Community Support
Community Support

Hi @Elliebai ,

Have you taken a try with the @mdevaney 's solution? Have you solved your problem?

 

According to the needs that you mentioned, I think you want to create a cascading Dropdown box in your app. I agree with @mdevaney 's thought almost. If the Dropdown box that you mentioned is a Dropdown control, the Default property of the Dropdown control could achieve your need:

Dropdown2.Default:

If(
   Dropdown1.Selected.Value = "Choice C",
   "Approved",
   Dropdown1.Selected.Value = "Choice B",
   "Reviewing",
   Dropdown1.Selected.Value = "Choice A",
   "Rejected"
)

 

If the Dropdown box that you mentioned is a ComboBox, please set the DefaultSelectedItems property of the ComboBox to following:

If(
   ComboBox1.Selected.Value = "Choice C",
   {
    Value: "Approved"
   },
   ...
)

 

Best regards,

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

Hi, 

 

Sorry, I think there is something wrong with my input.

These 2 dropdown lists are actually "Datacardvalue" in the Form, so your reply doesn't work for that.

Screenshot (111)_LI.jpg

v-xida-msft
Community Support
Community Support

Hi @Elliebai ,

Based on the issue that you mentioned, I think the second condition I mentioned above could achieve your needs.

 

I think you want to set default value within the Manager'a Approval ComboBox based on the selected value within the Item Chosen ComboBox, right?

 

I have made a test on my side, please consider take a try with the following workaround:

Set the DefaultSelectedItems property of the  Item Chosen ComboBox to following:

If(
   EditForm1.Mode = FormMode.New,
   If(
      ItemChosenComboBox.Selected.Value = "Choice C",  // please replace Choice C with actual Item option in your ItemChosen ComboBox
      {
        Value: "Approved"
      },
      Parent.Default
   ),
   Parent.Default
)

Note: The ItemChosenComboBox represents the ComboBox within the Item Chosen field data card, please replace it with actual ComboBox control name.

 

Please consider take a try with above solution, then check if the issue is solved.

 

Best regards,

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

View solution in original post

thank you so much! it really works!

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

PowerPlatform 768x460.png

Microsoft Learn

Check out our new Discover Your Career Path blog post series and get all the details.

Users online (1,196)