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 

 

That's very interesting.

 

Even if it seems like it doesn't make sense, try using UpdateIf and use a condition that always evaluates to true.

If you do this, does it work in the case of SP list column entry that had no value?

@poweractivate  - Yes, UpdateIf works fine

Could it be that you're facing this known issue?

https://powerusers.microsoft.com/t5/Building-Power-Apps/Unable-to-update-collection-from-gallery-if-...

 

I.e. that PApps currently has a bug/issue that it cannot update a column's value if that row from the datasource came with a NULL for that column.  Note that loosely speaking, NULL is a Blank in PApps (and, yes, the definition of Blank is being changed in PApps as time goes by).

 

As @timl  explains in that post:

 

"

A workaround for this problem is to replace any blank fields with an empty string. You could use code that looks like this after your ClearCollect:

UpdateIf(collection1, IsBlank(UtilityProviderName), {UtilityProviderName:""})
--> Repeat the above for any possible blank fields that you might want to update

"

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

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