cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
RomanKorchak
Helper IV
Helper IV

Patch not updating one particular column in collection

Hi All

I have a strange issue - I have a SharePoint list which I make into collection (just one row) in my Powerapp and then updating some columns. I have 1 particular column that just would not update. I tried  

      Patch( Collection, LookUp(Collection, ProjectNo=GProjectNo), {Column1: "ggg" } )

and it just would not update but it does update any other columns.

I tried copying that SP List (need to have exactly the same columns), connecting into Powerapp and update its collection - same issue with that one column.

Column name definitely correct - I triple checked it.   

Thanks

22 REPLIES 22

@RomanKorchak  It might depend how you are patching the SharePoint list. From where are you patching the SharePoint list in your app and in what way specifically are you doing so?

@RomanKorchak Not sure why it would or would not show an error, but first just try it anyway - is the issue still there even if you don't use the intermediate collection and patch the SharePoint list directly? Or does it work correctly when patching the SP list directly?

@RomanKorchak - If you are using a local collection and this collection has only one row, can you check in view tab - collection to see if the collection gathered the data correctly.

This can help you to see if the problem is before or during the PATCH() operation to SharePoint.

@gabibalaban - Collection is created on Screen Visible and it does gather the data correctly. And then I am trying to patch some columns in that collection where one column doesnt update. 

@RomanKorchak The app may be expecting a base record for transformation and to match the model in some cases. In your collection, is Column1 specified anywhere as a column in the base record of the collection itself (i.e. the one in the Lookup statement)? If you change it and do specify it, does it work then when patching? 

@poweractivate - Just tried patching that particular column directly to data source (SP List) and it works fine so its only patching that column into collection not working.

No, Column1 is not used anywhere else.  

@RomanKorchak Interesting. What is the formula you are using to patch from the Collection to the SharePoint list?

@poweractivate 
    Patch( SPList, LookUp(SPList, ProjectNo=GProjectNo), {Column1: "eng" } );

@RomanKorchak  And after you first patch the Collection as you were saying before, is this the one you also use to take it from the collection and patch it to the SharePoint List? Or do you use something else?

 

And then also, where is the Patch to the SharePoint list called from in your app? 

 

If you only patched the collection before, we would not know why it worked at all. At some point you need to patch the direct data source in the end. We would not know why patching the Collection does anything at all without even patching the actual Data Source. When you patch Collection, did it really change the underlying Data Source without even needing to patch the underlying Data Source?

Thats interesting - it looks like it only updates columns that already has a value (seems to be the case for all the columns, its just happend  that I was keep trying the one that has no value and I thought its a problem only with that column).

As soon as I put the value into a column in SP list and reopen the screen (so it recreates a collection) and try to update that column - it works.

So the problem is with updating collection field with no value. 

Helpful resources

Announcements
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!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

secondImage

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 (68,845)