I have two SharePoint lists:
List A: This is the main list where I want to store data. List B: This list contains coordinator details. Both lists have a "Coordinator" field, which is a Person or Group field with multi-select enabled.
In my Power Apps form:
I'm displaying data from List A in read-only mode. There's a Country dropdown (also from List A). I have a ComboBox that allows multiple selections and is populated with coordinators from List B, filtered based on the selected country. 🎯 Goal When users select multiple coordinators from the ComboBox (which shows data from List B), I want to patch those selected coordinators into the "Coordinator" field of List A.
Despite multiple attempts, I haven't been able to successfully patch the selected coordinators into List A.
Finally i solved my problem with below approach:
Previously, I used the “Depends on…” option under the Data source settings in the property pane to make the combo box dependent on another control. While this worked, it caused the values to appear as standard person-type entries, which limited flexibility. I’ve now switched to applying the filter logic directly in the Items property of the combo box. This approach gives me more control over the data structure, and using ForAll with the selected items works perfectly now. below is the item property of combo box.
ForAll(
Filter(
VisitCoordinatorsList,
Country = DDCountry_4.Selected.Value
),
{
CoordinatorName: VisitCoordinator0.DisplayName,
CoordinatorEmail: VisitCoordinator0.Email
}
)
then during patching i used
Visit_Coordinator: ForAll(
VisitCoordinatorComboBox_2.SelectedItems,
{
'@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
Claims: "i:0#.f|membership|" & Lower(CoordinatorEmail),
DisplayName: CoordinatorName,
Email: CoordinatorEmail,
Department:"",
JobTitle:"",
Picture:""
}
)