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

Notifications

Announcements

Community site session details

Community site session details

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

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,847 Super User 2025 Season 2 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
    153,034 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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard