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 / 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:
I have the same question (0)
  • Verified answer
    mmbr1606 Profile Picture
    14,605 Super User 2025 Season 2 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

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 739 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard