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 III
Super User III

@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. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too!

@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. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too!

@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
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

Top Solution Authors
Top Kudoed Authors
Users online (95,132)