Showing results for 
Search instead for 
Did you mean: 
Frequent Visitor

Patching a collection record property that is itself a record and saving to CDS

I have a collection (colTasks) One of the properties is es_week, which is a lookup (so a record itself). I can save this back to CDS without issue. I can modify the es_week for all colTasks with the following method and it will save to CDS without issue:


For reference, 

ComboBox2.Items = Filter(Weeks, 'Weeks (Views)'.'Next 6 Months')

However, I have a button that increments a single week up with the following OnSelect method:

        es_week: First( 
                'Week Number' = ThisItem.es_week.'Week Number' + 1 

It updates colTasks as expected and other parts of the app reflect the change and behave appropriately.

Screen Shot 2019-09-12 at 6.13.03 PM.png

However, on saving to CDS, PowerApps saves all the other records but does not even attempt to save the record whose week has been changed (I watched network traffic). Instead throws the error Value must be a data entity record.

On inspection of the colTasks.es_week using view collection, it appears to be property-per-property identical to all the other records, but something somewhere doesn't like it.

Screen Shot 2019-09-12 at 6.20.25 PM.pngScreen Shot 2019-09-12 at 6.16.21 PM.pngScreen Shot 2019-09-12 at 6.16.27 PM.png

Any ideas what I'm doing wrong? Genuinely, Sam



Community Support
Community Support

Re: Patching a collection record property that is itself a record and saving to CDS

Hi @iflyadesk ,

That's a little strange... After reading about your formulas seriously, I did not find anything wrong.

Based on the pics that you showed, do you mean that the updated record other data is right , except the es-weekid field?

If so, I suggest you try to change this field's value and update again.

For example:

                         es_week.'Week Number' = ThisItem.es_week.'Week Number' + 1 
                         ) ;
Patch( colTasks, ThisItem, { es_week:First(test)}



Best regards,

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Frequent Visitor

Re: Patching a collection record property that is itself a record and saving to CDS

Awesome idea, @v-yutliu-msft !  Unfortunately, it didn't work. Smiley Sad


I reached out to Microsoft Customer Support through the Admin Center and they did a screenshare with me and even brought on a "senior engineer" who seems to think I've done everything correctly as well, so this might actually be a bug in the platform.

Helpful resources

Community Conference

Power Platform Community Conference

Come join us today! Find your favorite faces from the community presenting at the Power Platform Community Conference!

Watch Now

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.


Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (3,504)