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

How to Patch multiple User Email to Person/Group column which allows multiple values?

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: ""
}
)

1 ACCEPTED SOLUTION

Accepted Solutions

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: ""
}

)

View solution in original post

5 REPLIES 5
RandyHayes
Super User
Super User

@mkhan73 

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.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

@RandyHayes I tried this but I am getting the following error:

 

mkhan73_0-1603302743387.png

 

@mkhan73 

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?

 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

@RandyHayes Now I am getting this error,

 

mkhan73_0-1603305231055.png

 

Here is my collection with four records and I am always getting the last record instead of all four records

 

 

mkhan73_2-1603305347439.png

 

 

 

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: ""
}

)

View solution in original post

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Power Apps Community Call Jan. 2022 768x460.png

Power Apps Community Call

Please join us on Wednesday, January 19th, at 8a PDT. Come and learn from our amazing speakers!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Top Solution Authors
Top Kudoed Authors
Users online (1,252)