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 / gallerycollection patc...
Power Apps
Answered

gallerycollection patch to sharepoint list

(0) ShareShare
ReportReport
Posted on by 132

Hi, I m working on an app created my an old colleauge of mine. In the app he has created a collection of items and every time a user adds a record it gets patched to the collection and then he sends all the collection with  a mail

 

The Patch

Patch(ItemsCollection, ThisItem, {DDPF: DDProductFamily1_2.Selected.Result, Price: Price1_2.Text, Gift: Gift1_2.Value, DDPR:DDProduct_7.Selected.Result,DDPack: PackagingDD1_2.Selected.Result, QuantityP: QuantityP1_2.Text, Calc:Value(Calc1_2.Text),Discounteuro:Price1_3.Text,Discountperc:DDProductFamily1_3.Selected.Value}); Collect(ItemsCollection,{DDPF: " ", Price: " ", Gift: "false", DDPR:" ", DDPack: " ", QuantityP: " ", Calc:0,Discounteuro: " ",Discountperc: " " })

I want to add a command on the button that sents the mail , to patch some of the data of every record of the collection to a sharepoint list. I have created the list , how should i patch ?

Categories:
  • Verified answer
    mmbr1606 Profile Picture
    14,629 Super User 2026 Season 1 on at

    hey @vaso 

     

     

    ForAll(
     ItemsCollection,
     Patch(
     'YourSharePointList', 
     Defaults('YourSharePointList'), 
     {
     SharePointColumnName1: DDPF,
     SharePointColumnName2: Price,
     SharePointColumnName3: Gift,
     // ... continue for other fields
     }
     )
    );

     

     

    • YourSharePointList is the name of your SharePoint list.
    • Defaults('YourSharePointList') is used to create a new record.
    • Inside the {}, you map your collection's item properties to the corresponding SharePoint list column names.

    Let me know if my answer helped solving your issue.

    If it did please accept as solution and give it a thumbs up so we can help others in the community.



    Greetings

  • vaso Profile Picture
    132 on at

    thank you @mmbr1606 

    i have a small issue . every time that the user completes a record and saves it to the collection , a new record is created  in order  to be filled. So every time that he finishes the records that he want there is one blank and that blank record is getting patched as a new line on my list. Is there a way to escape it?

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

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 382 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 329

#3
WarrenBelz Profile Picture

WarrenBelz 187 Most Valuable Professional

Last 30 days Overall leaderboard