cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
RomanKorchak
Level: Powered On

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

1 ACCEPTED SOLUTION

Accepted Solutions
dynamicsedge
Level 10

Re: Patch not updating one particular column in collection

@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

22 REPLIES 22
dynamicsedge
Level 10

Re: Patch not updating one particular column in collection

@RomanKorchak 

 

  1. Patch( Collection, LookUp(Collection, ProjectNo=GProjectNo), {Column1: "ggg" } ) - if you substitute  Column1 with another column you are saying you are sure it works every time? If not, check on the integrity ProjectNo, GProjectNo and Collection.
  2. Or if so, then what happens if you remove the data source from PowerApps and then re-add the data source does this help fix it?
  3. Was the Column added recently? it is possible you have to repeat #2 each time this happens. Also you may have to wait 5 minutes after doing #2, and you may need to close and open the PowerApps Studio after doing #2 as well. Also, try refreshing the data source as well by clicking the Refresh button from inside data source (rather than Refresh function).

 

RomanKorchak
Level: Powered On

Re: Patch not updating one particular column in collection

1. Other columns update fine. ProjectNo, GProjectNo and Collection are all correct.

2. I have tried readding SP list. I have also tried templating that SP list, creating new SP list from that template, adding that list into Powerapp and trying to update that particular column - same issue.

3. List was created a while ago and I have tried refreshing it by pressing button from inside data source

gabibalaban
Level 8

Re: Patch not updating one particular column in collection

Your code:

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

seems to patch the collection and not the datasource (sharepointlist) itself.

I wonder how it worked with the other columns ?

Maybe if you declare the source on PATCH function as sharepoint list it will work. 

 

 

 

 

dynamicsedge
Level 10

Re: Patch not updating one particular column in collection

@RomanKorchak 

 

  1. Is Column1 of type Text in the SharePoint list itself?
  2. Try putting single quotes around Column1 (though that probably won't make a difference)
RomanKorchak
Level: Powered On

Re: Patch not updating one particular column in collection

1. Column1 is "Single line of text" in SharePoint 

2. Tried putting single quotes around Column1 - Same issue 😞 

dynamicsedge
Level 10

Re: Patch not updating one particular column in collection

@RomanKorchak  did you also try @gabibalaban 's idea? 

 

That may be a good idea because it is interesting, upon a detailed look at this, you may be patching the Collection itself instead of patching the real data source as mentioned by @gabibalaban - that could sometimes lead to side effects like the one you are seeing.

RomanKorchak
Level: Powered On

Re: Patch not updating one particular column in collection

I need to patch collection. I do patch SP list later, but that works fine, the problem is its not even patching a collection (well, that one particular column, other columns are patched fine) 

dynamicsedge
Level 10

Re: Patch not updating one particular column in collection

@RomanKorchak There may be a way to accomplish it, but let's suppose you patch the data source directly - is the issue still there anyway? Then we could check how to do it with patching the collection first.

RomanKorchak
Level: Powered On

Re: Patch not updating one particular column in collection

Yeh, but why would only one particular column would not get patched and it doesnt show any errors?

Helpful resources

Announcements
Better Together’ Contest Finalists Announced!

'Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Join THE global Microsoft Power Platform event series

Attend for two days of expert-led learning and innovation on topics like AI and Analytics, powered by Dynamic Communities

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

thirdimage

Community Summit North America

Innovate, Collaborate, Grow - The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (10,143)