Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Answered

Patch SP List from Collection

(0) ShareShare
ReportReport
Posted on by 207

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:
  • SebS Profile Picture
    4,146 Super User 2025 Season 1 on at
    Re: Patch SP List from Collection

    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

  • Verified answer
    StuartSmith Profile Picture
    207 on at
    Re: Patch SP List from Collection

    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.

  • martijnA Profile Picture
    62 on at
    Re: Patch SP List from Collection

    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

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,708 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,030 Most Valuable Professional

Leaderboard