I am trying to patch multiple combo box (User email) values to person/group column which allows multiple values. But, PowerApps is only patching the last selected person value. Anyone know how to achieve this task?
Below is my code, I am also collecting User email in collection. If I try to do SelectedItems.Email, PowerApps give me the error.
ForAll(ApproversCollection.ApproverName,
{
'@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
Claims: ComboBox2.Selected.Email,
Department: "",
DisplayName: DisplayName,
Email: Email,
JobTitle: "",
Picture: ""
}
)
Solved! Go to Solution.
I got it working through this and without collection
Approver: ForAll(ComboBox2.SelectedItems.Email, {
'@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
Claims: "i:0#.f|membership|" & ThisRecord.Email,
Department: "",
DisplayName: DisplayName,
Email: Email,
JobTitle: "",
Picture: ""
}
)
Please consider changing your Formula to the following:
ForAll(ApproversCollection,
{
'@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
Claims: ApproverName.Email,
Department: "",
DisplayName: ApproverName.Email,
Email: ApproverName.Email,
JobTitle: "",
Picture: ""
}
)
I hope this is helpful for you.
Sorry, I had copied your original and didn't notice the mistake.
Your formula should be the following:
ForAll(ApproversCollection,
{
'@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
Claims: "i:0#.f|membership|" & Lower(ApproverName.Email),
Department: "",
DisplayName: ApproverName.Email,
Email: ApproverName.Email,
JobTitle: ".",
Picture: "."
}
)
EDIT: Actually I am also noticing that you were using ApproverName before in your ForAll...is the Email column in the Approver name a single line of text (email) or is it a table of emails?
@RandyHayes Now I am getting this error,
Here is my collection with four records and I am always getting the last record instead of all four records
I got it working through this and without collection
Approver: ForAll(ComboBox2.SelectedItems.Email, {
'@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
Claims: "i:0#.f|membership|" & ThisRecord.Email,
Department: "",
DisplayName: DisplayName,
Email: Email,
JobTitle: "",
Picture: ""
}
)