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
Solved! Go to Solution.
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.
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.
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.
User | Count |
---|---|
251 | |
102 | |
94 | |
48 | |
37 |