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

Cascading Combo Box not Saving

Hi,

 

I've customized the form for a SharePoint Document Library and am having trouble getting my cascading combo boxes to update the selected choices on save.

 

Setup

I have a Sharepoint List called EngDocClass which has 2 columns that I am using - Group and Type1 which I am using to store metadata choices for a separate Document Library.  Structure is kind of like below where Type1 is  a subset of Group.

 

Group            Type1

Manual          User Manual

Manual          Maintenance Manual

Certificate      Training Certificate

Certificate      Cleaning Certificate

 

In the form for my Document Library I have a dropdown for Group and that selection is used to filter Type1 in the Combo Box choices for a Document Type column.  I think that is working because I am seeing the choices properly filtered when I change the Group selection.  However, when I save the form the Document Type field does not get updated.  Document Type is configured as a Choice field where multiple selections are allowed.  Here is my form setup:

 

Document Type_DataCard1

DataField = "Document_x0020_Type"

Default = ThisItem.'Document Type'

Update = DocTypeCombo.SelectedItems  (I've also tried with a .Type1 here instead of in Items with no success)

 

DocTypeCombo

DisplayFields = ["Type1"]

Items = Filter(EngDocClass, Group = ddGroup.Selected.Result).Type1

 

1 ACCEPTED SOLUTION

Accepted Solutions
Super User III
Super User III

Hi @TrueBlue008 ,

You are writing a multi-value field back to a table, so this is not straight-forward. Try this first

ForAll(
    DocTypeCombo.SelectedItems,
   {Value:Type1}
)

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

View solution in original post

3 REPLIES 3
Super User III
Super User III

Hi @TrueBlue008 ,

You are writing a multi-value field back to a table, so this is not straight-forward. Try this first

ForAll(
    DocTypeCombo.SelectedItems,
   {Value:Type1}
)

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

View solution in original post

This worked - thank you!

 

I guess I don't understand why .SelectedItems is not considered a Table - the default ComboBox has it in this format.

Thanks @TrueBlue008 ,

It actually is a table with one column, so you have to write the values one at a time (hence the ForAll) - If you put DocTypeCombo.Selected.Value you will get the first item selected.

Your target is also a table, so you need to enclosed the syntax in {} brackets and refer to the Value (which again is the only field in the table) and populate that one record at a time.

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 (8,647)