Skip to main content

Notifications

Community site session details

Community site session details

Session Id : 3XyX3K4z/TrrottyNITLNy
Power Apps - Building Power Apps
Answered

Patch multiple records not working as expected

Like (1) ShareShare
ReportReport
Posted on 8 Feb 2025 13:42:32 by 19
I've been exploring the patch function, and I have a SharePoint list and a Dataverse table. Each data source has a Title (primary name) column, progress (text), outcome (text) and ID (autonumber). 
 
I have the following code:
 
ClearCollect(
colUpdateWorkLog,
Table(
WorkLog@{
ID: 2,
Title: "New Value",
Outcome: "Updated Outcome"
},
WorkLog@{
ID: 4,
Progress: "Active"
},
WorkLog@{
ID: 5,
logDate: Date(2022, 08, 01)
}
)
);
Patch(
WorkLogs,
ShowColumns(
colUpdateWorkLog,
"ID"
),
colUpdateWorkLog
);
 
In SharePoint this code works as expected, though in Dataverse it does not and creates new rows with the values in the collection rather than updating the relevant rows in the table. 
 
Any advice on this would be appreciated as I'm scratching my head and can't seem to come up with an answer.
  • Ben Crowe Profile Picture
    19 on 08 Feb 2025 at 16:46:28
    Patch multiple records not working as expected
    Oh right I did wondered if I'd have to use the guid. Wasn't sure if the show columns would be able to filter against the custom column in my dataverse table. 
  • Verified answer
    Michael E. Gernaey Profile Picture
    35,752 Super User 2025 Season 1 on 08 Feb 2025 at 15:59:25
    Patch multiple records not working as expected
    Hi
     
    In dataverse ID is a guid, not an INT, where as in SharePoint its an INT, so you aren't specifically identifying the row to update in Dataverse by using an INT
     
     
     
     

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

Thomas Rice – Community Spotlight

We are honored to recognize Thomas Rice as our March 2025 Community…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,508 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,369 Most Valuable Professional

Leaderboard
Loading started