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 / Patch function throws ...
Power Apps
Unanswered

Patch function throws error message

(0) ShareShare
ReportReport
Posted on by 233

I am using the same script for several different collections and SP lists and it works for all except one.

I'm trying to patch the SP list with my collection.

 

PA Question.png

colMaintenance is an exact mirror of the MaintenanceLog list. 

 

Any Ideas?

Categories:
I have the same question (0)
  • vikulkar Profile Picture
    Microsoft Employee on at

    Hello @awalker - Please check the patch function usage in:

    https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-patch#examples

     

    From the error message the second argument should be a record but a table is being passed.

    Here is another way of using Patch data from one list to another

    https://powerusers.microsoft.com/t5/Building-Power-Apps/PATCH-function-with-2-lists/m-p/191319#M62426

     

  • awalker Profile Picture
    233 on at

    The app only accesses the datasource in SP if there is a wifi connection. Until then the user works with collections.

    Should a wifi connection be established, I want the collection to update the SP list before I reset and repopulate the collection.

    The collection gets reset so that a first-time user has all the required columns and existing data from the SP list.

     

    I can use the "Collect" function to update data from the collection into the SP list, but that duplicates records when the collection gets reset.

    In my four other SP lists and collections I can patch the SP list just fine. This is the only one giving me trouble.

     

    E.g. for my mileage log the script works properly:

     

    PA Question.png

    But for my Maintenance log the Patch function won't take:

     

    PA Question.png

     

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

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 358 Most Valuable Professional

#2
11manish Profile Picture

11manish 214 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 185

Last 30 days Overall leaderboard