cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
vsolanon Helper III
Helper III

Populate a Dropdown Based on the Value of Another Dropdown

Hi experts!

I would like to populate the value selected in one dropdown into a second dropdown, however, it is not working as expected.

 

I have an EditForm which is connected to an SP List. The SP list has two Choice columns "Segment and ValidatedSegment" and both have the same information on it. I would like that when the user selects one option from the Segment dropdown, the same value selected populate in the second dropdown. Kindly note the second dropdown will be hidden.

Segment choice column with options: Option1, Option2, Option3, Option4...

ValidatedSegment choice column with options: Option1, Option2, Option3, Option4...

 

I have tried with the below formula without any success, I am wondering if this might be related due to the Items property,

 On the Default property of the DataCardDropdown2: DataCardValue25.Selected

 

Thank you in advance!

 

1 ACCEPTED SOLUTION

Accepted Solutions
MarvinBangert Resolver III
Resolver III

Re: Populate a Dropdown Based on the Value of Another Dropdown

Hey @vsolanon 

first: would it be possible to create the column "ValidatedSegment" in SharePoint as a calculated column? Then you are able to show the same value as in segment (depends on what you want to do with this column value).

 

otherwise: you need a dropdown to achieve this. A dropdown list just shows the values of a table, a combination field (default action if you add a SharePoint Field within a form) shows the datasets the user can select.

Select one of the items in the ValidatedSegment_DataCard and then add a dropdown field within the DataCard (make sure you unlocked the settings):

Image 591.pngImage 592.png

Change the Dropdown7.Items formula to

Filter(Choices(List.ValidatedSegment); Value = DataCardValue2.Selected.Value)

DataCardValue2.Selected.Value is your Segment DataCard combination field (DataCardValue25.Selected as from your description).

This should work fine, if you select a Segment the dropdown should show the same value:

Image 593.png

Then you can delete the combination field, after that you will see some errors on your ValidateSegment DataCard. Just update the functions with the dropdown:

Example: ValidatedSegment_DataCard.Update from

DataCardValue10.Selected

  to

Dropdown7.Selected

If you Submit your form, the value should be visible in your SharePoint list:

Image 594.pngImage 595.png

 

Hope this will help you! 🙂

 

Regards,

Marvin

View solution in original post

2 REPLIES 2
MarvinBangert Resolver III
Resolver III

Re: Populate a Dropdown Based on the Value of Another Dropdown

Hey @vsolanon 

first: would it be possible to create the column "ValidatedSegment" in SharePoint as a calculated column? Then you are able to show the same value as in segment (depends on what you want to do with this column value).

 

otherwise: you need a dropdown to achieve this. A dropdown list just shows the values of a table, a combination field (default action if you add a SharePoint Field within a form) shows the datasets the user can select.

Select one of the items in the ValidatedSegment_DataCard and then add a dropdown field within the DataCard (make sure you unlocked the settings):

Image 591.pngImage 592.png

Change the Dropdown7.Items formula to

Filter(Choices(List.ValidatedSegment); Value = DataCardValue2.Selected.Value)

DataCardValue2.Selected.Value is your Segment DataCard combination field (DataCardValue25.Selected as from your description).

This should work fine, if you select a Segment the dropdown should show the same value:

Image 593.png

Then you can delete the combination field, after that you will see some errors on your ValidateSegment DataCard. Just update the functions with the dropdown:

Example: ValidatedSegment_DataCard.Update from

DataCardValue10.Selected

  to

Dropdown7.Selected

If you Submit your form, the value should be visible in your SharePoint list:

Image 594.pngImage 595.png

 

Hope this will help you! 🙂

 

Regards,

Marvin

View solution in original post

Highlighted
vsolanon Helper III
Helper III

Re: Populate a Dropdown Based on the Value of Another Dropdown

Hi @MarvinBangert , thank you very much! It work like a charm!

 

I had to create it as a dropdown list since the user will be able then to go and update this field (ValidatedSegment) 🙂

Helpful resources

Announcements
MBAS Gallery 2020

MBAS Gallery 2020

Watch Microsoft Business Applications Summit sessions on-demand.

firstImage

New Ranks and Rank Icons released on April 21!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power Apps Community!

Top Solution Authors
Top Kudoed Authors
Users online (7,534)