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

Dependent Drop Down Selections in Form - Multiple Data Sources

I have a form that has a drop down to select the user's department and a combo box to select the various email groups that user is a part of. When the form is submitted, the data is saved to a sharepoint list. 

The email group list is extremely long and I would love to be able to filter these groups based on the selected department. I created a second Sharepoint list with Departments and Email Groups and changed the Items property for the combo box in the form to: Distinct(Filter('Distribution Lists', Department = drpDepartment.Selected.Value), Title) and it worked great. The correct distribution lists displayed based on the selected department. However, these values did not write back to Sharepoint. 

Is there a way to get these to write back to Sharepoint OR is there a way to filter the drop down content without the use of a second list? 

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support
Community Support

Hi @modernoddity ,

Which type column do you use to store the email groups in your original SP List? Using a Choice type column?

 

I assume that you use a Choice type column in your Original SP list to store the email groups, and the Choice type column has enabled "Allow Multiple Selections" option in your original SP list, is it true?

 

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

Within your Edit form, set the Items property of the ComboBox within the Email Group data card to following:

Distinct(Filter('Distribution Lists', Department = drpDepartment.Selected.Value), Title)

Set the Update property of the Email Group Data card (in your Edit form) which contains the ComboBox to following:

ForAll(
           EmailGroupComboBox.SelectedItems,             /* <-- EmailGroupComboBox represents the ComboBox within the Email Group data card in your Edit form */
           {
              Value: Result
           }
)

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

3 REPLIES 3
Community Support
Community Support

Hi @modernoddity ,

Which type column do you use to store the email groups in your original SP List? Using a Choice type column?

 

I assume that you use a Choice type column in your Original SP list to store the email groups, and the Choice type column has enabled "Allow Multiple Selections" option in your original SP list, is it true?

 

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

Within your Edit form, set the Items property of the ComboBox within the Email Group data card to following:

Distinct(Filter('Distribution Lists', Department = drpDepartment.Selected.Value), Title)

Set the Update property of the Email Group Data card (in your Edit form) which contains the ComboBox to following:

ForAll(
           EmailGroupComboBox.SelectedItems,             /* <-- EmailGroupComboBox represents the ComboBox within the Email Group data card in your Edit form */
           {
              Value: Result
           }
)

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

Helper III
Helper III

@v-xida-msft  Thank you! That did the trick 🙂

@v-xida-msft 

 

So the form works great but now I'm running into a new issue. 
Elsewhere in the app, the selected email lists are displayed in an editable combo box. Since making the change to the form, I am no longer able to save the updated information. I've removed the Distribution List from the Patch statement because no matter what I entered, I got an error. I tried adding a new statement after the patch statement but again, no matter what I try (Update, UpdateIf, Patch, ForAll), I get this error: 

 

Screenshot_7.png

 

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

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