web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / How to patch mail entr...
Power Apps
Answered

How to patch mail entries from collection into a SharePoint List

(0) ShareShare
ReportReport
Posted on by 16
Hi everyone,

i need your help. I would like to save all email addresses from the "colSelectedPerson" collection into a SharePoint "Permissions" list.
The structure of the collection is as follows:
 
Name mail
Adam Rzychon Adam.Rzychon@adamspp.de
Mike Tryderson Mike.Tryderson@adamspp.de

The email addresses from the collection should go into an SP column, which is defined as a person column with multiple selection.
So far I've tried this code:
 
SubmitForm('03_01_04-06_frm_Form'); // Formular absenden
Set(varLastSavedRecord, '03_01_04-06_frm_Form'.LastSubmit.ID); 

ForAll(
    colSelectedPerson, 
    Patch(
        Permissions, 
        LookUp(Permissions, ID = varLastSavedRecord), 
        {Person:  ThisRecord.mail}
    )
);

Set(varBreadcrumbValue, 2); 
ResetForm('03_01_04-06_frm_Form') 

This code is throwing an error. I feel like it is expecting a table.


 
 

Is there a way to save the email addresses from the collection into the SP list?

Thank you! 
I have the same question (0)
  • ronaldwalcott Profile Picture
    3,906 Moderator on at
    I had seen this post which could possibly help PATCH A SharePoint Person Column In Power Apps - Matthew Devaney
  • Verified answer
    WarrenBelz Profile Picture
    156,100 Most Valuable Professional on at
    Hi  Adam_9595
    Try this format - it would also be better to submit the Form then have the rest of the code OnSuccess of the Form. If you do that, you can use Self.LastSubmit.ID in the code below.
    SubmitForm('03_01_04-06_frm_Form'); 
    Patch(
       Permissions,
       {
          ID: '03_01_04-06_frm_Form'.LastSubmit.ID,
          Person: 
          ForAll(
             colSelectedPerson As _Data,
             {
                Claims: "i:0#.f|membership|" & Lower(_Data.mail),
                Department: "",
                DisplayName: _Data.Name,
                Email: _Data.mail,
                JobTitle: "",
                Picture: ""
             }
          )
       }
    );
    Set(varBreadcrumbValue, 2); 
    ResetForm('03_01_04-06_frm_Form')
     
    Please click Does this answer your question 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 a Like.
    MVP (Business Applications)     Visit my blog Practical Power Apps    Buy me a coffee
  • Adam_9595 Profile Picture
    16 on at
    Thank you @WarrenBelz!

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 325 Most Valuable Professional

#2
11manish Profile Picture

11manish 165

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 88 Super User 2026 Season 1

Last 30 days Overall leaderboard