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?

View solution in original post

@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
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.

Top Solution Authors
Top Kudoed Authors
Users online (76,480)