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 / Patch SP List from Col...
Power Apps
Unanswered

Patch SP List from Collection

(0) ShareShare
ReportReport
Posted on by 225

I have a collection called "colUserDetails" with columns called "Name", "UserID", "EmailAddress", "Floor", "Zone" & "SeatNumber".  The collection will only ever have 1 row.

 

I then have an SP List called "Monitor App" with the same columns as the collection.  All columns are "Single line of Text" type.  

 

I need to patch the data in the collection to the SP list.  I have watched so many videos and read so many web pages, but still I cant get it to patch. Please help.

Thanks, in advance.

Categories:
I have the same question (0)
  • martijnA Profile Picture
    62 on at

    Patch('Monitor App', Defaults('Monitor App'),

    {

    Name: First(colUserDetails).Name,

    UserID: First(colUserDetails).UserID,

    Floor: First(colUserDetails).Floor,

    Zone: First(colUserDetails).Zone,

    SeatNumber: First(colUserDetails).SeatNumber,

    EmailAddress:First(colUserDetails).EmailAddress})

     

    ___________________________________________________________________________________

    If I have answered your question, please mark your post as Solved
    If you like my response, please give it a Thumbs Up

  • Verified answer
    StuartSmith Profile Picture
    225 on at

    Figured it out, the issue with the SP wanted a "Title" value for the patch, despite removing the "Title" column from the list.  Anyway, added "Title: "Blah" and the patch worked.

  • SebS Profile Picture
    4,582 Moderator on at

    Hi @StuartSmith,

     

    If Your Collection have the same schema as your SP List it should be easy as

     

     

    Patch('Monitor App',colUserDetails)

     

    Just keep in mind columns in SP List need to have same name as collection columns to use above approach

     

    If you looking to Patch only Selected columns it will look like this and then columns can have some name variations you will match columns in Patch as Below

     

     

    Patch('Monitor App',
     ForAll(colUserDetails As _items,
     {
     ID: _items.ID
     Name: _items.Name
     UserID: _items.UserID
     }
     )
    )

     

     

    Hope that Help

     

    Regards

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

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 333 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard