Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Power Apps Pro Dev & ISV
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! 
  • Adam_9595 Profile Picture
    16 on at
    How to patch mail entries from collection into a SharePoint List
    Thank you @WarrenBelz!
  • Verified answer
    WarrenBelz Profile Picture
    148,638 Most Valuable Professional on at
    How to patch mail entries from collection into a SharePoint List
    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
  • ronaldwalcott Profile Picture
    3,820 on at
    How to patch mail entries from collection into a SharePoint List
    I had seen this post which could possibly help PATCH A SharePoint Person Column In Power Apps - Matthew Devaney

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

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 791 Most Valuable Professional

#2
MS.Ragavendar Profile Picture

MS.Ragavendar 410

#3
mmbr1606 Profile Picture

mmbr1606 275 Super User 2025 Season 1