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 / Help required for Powe...
Power Apps
Answered

Help required for PowerApps updating DataVerse table from a collection

(0) ShareShare
ReportReport
Posted on by 18
I can create a record in the DataVerse table fine no issues there, but am struggling to update that same record.
Am also looking for the code to update all records but create new record if the record in the collection is not in the dataverse table.
 
I have been messing around with lots of code, but just cant get it to work for updating.
 
 
Create Record Code:
 

 

 

ForAll(
Collection,
Patch(
'DateVerseTable',
Defaults('DataVerseTable'),
{CollectionID: ThisRecord.CollectionID,
'Damaged': ThisRecord.'Damaged'
}
))

 

 

 
 
Edit Record Code:
 

 

 

ForAll(
Collection,
Patch(
LookUp(
'DataVerseTable',
CollectionID = ThisRecord.CollectionID
),
{'Damaged': ThisRecord.'Damaged'}
)
)

 

 

Edit Record code runs with no errors, but the table is not updated.
 
Cant understand why it doesn't update.
 
any idea help guidance would be appreciated.
Categories:
I have the same question (0)
  • Verified answer
    WarrenBelz Profile Picture
    156,456 Most Valuable Professional on at

    Hi @Spikenaylor ,

    Update should be as below

    ForAll(
     Collection As aCol,
     Patch(
     'DataVerseTable',
     LookUp(
     'DataVerseTable',
     CollectionID = aCol.CollectionID
     ),
     {'Damaged': aCol.'Damaged'}
     )
    )

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    MVP (Business Applications)   Visit my blog Practical Power Apps

  • Spikenaylor Profile Picture
    18 on at

    Many thanks, that worked. I have seen this structure before, but why do we have redefine the Collection as another entity?

     

  • WarrenBelz Profile Picture
    156,456 Most Valuable Professional on at

    Hi @Spikenaylor ,

    As is a disambiguation operator and you have identical field names in the source and target.

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

#2
11manish Profile Picture

11manish 225 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 211

Last 30 days Overall leaderboard