cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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
Highlighted
Community Support
Community Support

Re: How to create dependancy in 2 dropdowns

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
Highlighted
Super User III
Super User III

Re: How to create dependancy in 2 dropdowns

@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."

Highlighted
Community Support
Community Support

Re: How to create dependancy in 2 dropdowns

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.
Highlighted
Frequent Visitor

Re: How to create dependancy in 2 dropdowns

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

Highlighted
Community Support
Community Support

Re: How to create dependancy in 2 dropdowns

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

Highlighted
Frequent Visitor

Re: How to create dependancy in 2 dropdowns

thank you so much! it really works!

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Find your favorite faces from the community presenting at the Power Platform Community Conference!

Watch Now

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (8,527)