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 / Patching Multiple Reco...
Power Apps
Answered

Patching Multiple Records to SharePoint

(0) ShareShare
ReportReport
Posted on by 26

Hi Guys,

 

Please can you help I am creating an offline app that all the data saves to a collection until they do the last entry on a Saturday (for reference its a daily inspection).

When I use the patch on it, it works correctly and sends the data to SharePoint but it only puts the last items values ie. Saturdays values in all the entries.

 

Please can you help

 

ForAll(
OfflineData,
Patch(
'Quarry Daily Inspections',
Defaults('Quarry Daily Inspections'),
{
Title: Dropdown2.Selected.Value,
Activeface: Checkbox1.Value,
Facesadjacent: Checkbox1_1.Value,
Slopesadjacent: Checkbox1_2.Value,
Overburden: Checkbox1_3.Value,
Settlementlagoons: Checkbox1_4.Value,
Stockpiles: Checkbox1_5.Value,
Haulroads: Checkbox1_6.Value,
Signnotices: Checkbox1_7.Value,
Sitepersonnel: Checkbox1_8.Value,
Bundwaste: Checkbox1_9.Value,
Comments: TextInput1.Text
}
)

);
Clear(OfflineData);
SaveData(
OfflineData,
"OfflineData"
);
Navigate(Save)

Categories:
  • BCLS776 Profile Picture
    8,994 Moderator on at

    Assuming your OfflineData collection has the same schema as your SharePoint List, try:

    ForAll(
     OfflineData As aRecord,
     Patch(
     'Quarry Daily Inspections',
     Defaults('Quarry Daily Inspections'),
     {
     Title: aRecord.Title,
     Activeface: aRecord.Activeface,
     Facesadjacent: aRecord.Facesadjacent,
     Slopesadjacent: aRecord.Slopesadjacent,
     Overburden: aRecord.Overburden,
     Settlementlagoons: aRecord.Settlementlagoons,
     Stockpiles: aRecord.Stockpiles,
     Haulroads: aRecord.Haulroads,
     Signnotices: aRecord.Signnotices,
     Sitepersonnel: aRecord.Sitepersonnel,
     Bundwaste: aRecord.Bundwaste,
     Comments: aRecord.Comments
     }
     )
    );

    Hope that helps,

    Bryan

  • AdamS1 Profile Picture
    26 on at

    Hi Bryan,

     

    Thank you for the quick reply, what would be the case as currently I have drop downs and check boxes for PowerApps but when doing it to SharePoint it kept throwing up an error until I changed the SharePoint list columns to single line of text.

     

    Is there an easy way to fix this or do I need to re-create my columns 

    .

     

    Thank you in advance

     

    Adam

  • Verified answer
    BCLS776 Profile Picture
    8,994 Moderator on at

    SharePoint probably won't let you convert single line of text columns to a yes/no or choice type, so there isn't an easy fix. This also gets well beyond your initial question, so it should go into another thread altogether. A few pointers though to get you started:

    • Whatever you are trying to Patch() must match the schema of the column, or it will throw an error
    • Some of your issues may come from a collection that is storing the boolean literal, true, as a string, "true" - make sure the collection is storing what you intend
    • Watch out for the Title column - it can only be a single line of text and nothing else

    One of our other Super Users has a blog article on SharePoint yes/no columns. Worth a read.

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 360 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 325

#3
Mohsin Ali Profile Picture

Mohsin Ali 232

Last 30 days Overall leaderboard