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

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.

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

PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!


Are Your Ready?

Test your skills now with the Cloud Skill Challenge.


Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Top Solution Authors
Top Kudoed Authors
Users online (56,614)