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 / Dataverse Update a cho...
Power Apps
Answered

Dataverse Update a choice column using Patch

(0) ShareShare
ReportReport
Posted on by 27

I have a collection which is filtered as follows:

ClearCollect(collection, Filter(Child Table, Parent Table.GUID = variable containing GUID)

 

Which is collection all the records that I need to update. Then I am trying to do the following:

ForAll(collection
,Patch(Child Table, LookUp(Child Table, GUID = ThisRecord.GUID),{Choice Column : Choice Record}))

 

When doing this I'm getting the following errors:

kves_0-1693995749289.png

So it appears to be reading the table as a GUID instead of a table? I've tried to put the table in as [@Child Table] to stop any ambiguity and am then getting an 'Error when trying to receive data from the network' error.

 

I've tried renaming the fields, Selecting only 2 columns and putting that into a second collection (both of which give the network error) & just patching the whole collection to the child table (Which gives no error but doesn't work). I've tried removing and re-adding the Child Table datasource and that didn't fix it either, its important to note that I am using this table in a gallery elsewhere in the app and that is working fine.

 

Nothing is working, what am I doing wrong?

Categories:
  • Verified answer
    LaurensM Profile Picture
    12,516 Moderator on at

    @kves,

     

    Is the collection filled in properly or does an error occur there as well?

    Within the provided code I do see that a closing bracket is missing for the ClearCollect statement:

     

    ClearCollect(collection, Filter(Child Table, Parent Table.GUID = variable containing GUID) )

     

    Regarding the ForAll, you could try and create an explicit record scope via the As operator:

    ForAll(
     collection As Main,
     Patch(
     Child Table, 
     LookUp(Child Table, GUID = Main.GUID),
     {Choice Column : Choice Record}
     )
    )

     

    If this solves your question, would you be so kind as to accept it as a solution & give it a thumbs up.

    Thanks!

  • kves Profile Picture
    27 on at

    Hi @LaurensM,

     

    I tried to do this and it didn't work and I relised it was because I'd put 'as' and not 'As' once I added that capital letter it worked, thank you!

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

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 342 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 283

#3
Mohsin Ali Profile Picture

Mohsin Ali 221

Last 30 days Overall leaderboard