cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper II
Helper II

Powerapp no longer saving to sharepoint and updating

Hello, 

 

I have an app that updates a sharepoint list each month. Until recently it has worked, the item would be updated in the app and in sharepoint but now it won't do either. You can enter the number and hit save but it does nothing. I am using Patch to patch the data to sharepoint. It started with when the number was entered and saved it wouldn't refresh the number but now it is not saving at all. 

 

Here is the code that I am using. 

 

 

Patch(SRSIndicators, LookUp(SRSIndicators, ID=ThisItem.ID && Year=2020), {January: Value(LookUp(Gallery6_3.AllItems, month=1).TextInput1_3.Text), February: Value(LookUp(Gallery6_3.AllItems, month=2).TextInput1_3.Text), March: Value(LookUp(Gallery6_3.AllItems, month=3).TextInput1_3.Text), April: Value(LookUp(Gallery6_3.AllItems, month=4).TextInput1_3.Text), May: Value(LookUp(Gallery6_3.AllItems, month=5).TextInput1_3.Text), June: Value(LookUp(Gallery6_3.AllItems, month=6).TextInput1_3.Text), July: Value(LookUp(Gallery6_3.AllItems, month=7).TextInput1_3.Text), August: Value(LookUp(Gallery6_3.AllItems, month=8).TextInput1_3.Text), September: Value(LookUp(Gallery6_3.AllItems, month=9).TextInput1_3.Text), October: Value(LookUp(Gallery6_3.AllItems, month=10).TextInput1_3.Text), November: Value(LookUp(Gallery6_3.AllItems, month=11).TextInput1_3.Text), December: Value(LookUp(Gallery6_3.AllItems, month=12).TextInput1_3.Text)}); Patch(colSRS, LookUp(colSRS, ID=ThisItem.ID), {January: Value(LookUp(Gallery6_3.AllItems, month=1).TextInput1_3.Text), February: Value(LookUp(Gallery6_3.AllItems, month=2).TextInput1_3.Text), March: Value(LookUp(Gallery6_3.AllItems, month=3).TextInput1_3.Text), April: Value(LookUp(Gallery6_3.AllItems, month=4).TextInput1_3.Text), May: Value(LookUp(Gallery6_3.AllItems, month=5).TextInput1_3.Text), June: Value(LookUp(Gallery6_3.AllItems, month=6).TextInput1_3.Text), July: Value(LookUp(Gallery6_3.AllItems, month=7).TextInput1_3.Text), August: Value(LookUp(Gallery6_3.AllItems, month=8).TextInput1_3.Text), September: Value(LookUp(Gallery6_3.AllItems, month=9).TextInput1_3.Text), October: Value(LookUp(Gallery6_3.AllItems, month=10).TextInput1_3.Text), November: Value(LookUp(Gallery6_3.AllItems, month=11).TextInput1_3.Text), December: Value(LookUp(Gallery6_3.AllItems, month=12).TextInput1_3.Text)})

 

 Any help is greatly apricated as I need to get this back up and running ASAP. 

 

TIA

4 REPLIES 4
Highlighted
Super User III
Super User III

Re: Powerapp no longer saving to sharepoint and updating

Hi @jjasper 

The first thing that caught my attention was the LookUp(SRSIndicators, ID=ThisItem.ID && Year=2020). Could you just filter the gallery by year and use  LookUp(SRSIndicators, ID=ThisItem.ID) to select the correct record to patch?  Also take a look at the With() function to simplify your formula. https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-with .  This could help prevent a typo from ruining your formula.

Highlighted
Community Support
Community Support

Re: Powerapp no longer saving to sharepoint and updating

Hi @jjasper :

Could you tell me if this code was useful before?

First,as suggested by @Drrickryp , confirm that the code "LookUp(SRSIndicators, ID=ThisItem.ID && Year=2020)" is valid.

Second,create a custom collection to check whether this code can get the correct result

 

 

ClearCollect(customcollection,
{January: Value(LookUp(Gallery6_3.AllItems, month=1).TextInput1_3.Text), February: Value(LookUp(Gallery6_3.AllItems, month=2).TextInput1_3.Text), March: Value(LookUp(Gallery6_3.AllItems, month=3).TextInput1_3.Text), April: Value(LookUp(Gallery6_3.AllItems, month=4).TextInput1_3.Text), May: Value(LookUp(Gallery6_3.AllItems, month=5).TextInput1_3.Text), June: Value(LookUp(Gallery6_3.AllItems, month=6).TextInput1_3.Text), July: Value(LookUp(Gallery6_3.AllItems, month=7).TextInput1_3.Text), August: Value(LookUp(Gallery6_3.AllItems, month=8).TextInput1_3.Text), September: Value(LookUp(Gallery6_3.AllItems, month=9).TextInput1_3.Text), October: Value(LookUp(Gallery6_3.AllItems, month=10).TextInput1_3.Text), November: Value(LookUp(Gallery6_3.AllItems, month=11).TextInput1_3.Text), December: Value(LookUp(Gallery6_3.AllItems, month=12).TextInput1_3.Text)}); Patch(colSRS, LookUp(colSRS, ID=ThisItem.ID), {January: Value(LookUp(Gallery6_3.AllItems, month=1).TextInput1_3.Text), February: Value(LookUp(Gallery6_3.AllItems, month=2).TextInput1_3.Text), March: Value(LookUp(Gallery6_3.AllItems, month=3).TextInput1_3.Text), April: Value(LookUp(Gallery6_3.AllItems, month=4).TextInput1_3.Text), May: Value(LookUp(Gallery6_3.AllItems, month=5).TextInput1_3.Text), June: Value(LookUp(Gallery6_3.AllItems, month=6).TextInput1_3.Text), July: Value(LookUp(Gallery6_3.AllItems, month=7).TextInput1_3.Text), August: Value(LookUp(Gallery6_3.AllItems, month=8).TextInput1_3.Text), September: Value(LookUp(Gallery6_3.AllItems, month=9).TextInput1_3.Text), October: Value(LookUp(Gallery6_3.AllItems, month=10).TextInput1_3.Text), November: Value(LookUp(Gallery6_3.AllItems, month=11).TextInput1_3.Text), December: Value(LookUp(Gallery6_3.AllItems, month=12).TextInput1_3.Text)})

 

 

Finally,Is there any error in this app? Could you provide a screenshot of the error?

Best Regards,

Bof

Highlighted
Helper II
Helper II

Re: Powerapp no longer saving to sharepoint and updating

The code was working before and useful before. When I first created the app I had someone help me build it and this is the code they supplied and it work great for 2019. For 2020 not so much. I have fixed the code and I no errors in the app now. But it still won't save to SharePoint and update. I am unsure what has changed from last year to this year other than the filters. I have changed the app to go to a different SharePoint list so there is no need for the year filter. I have fixed all connections and have no errors in the app but it still isn't work. I am unsure what to do or even what to search for to help fix my error. If you can guide me that would be great. I need to get this back up running ASAP so we can run our reports. 

 

TIA

Highlighted
Community Support
Community Support

Re: Powerapp no longer saving to sharepoint and updating

Hi @jjasper :

Please try if this code:

 

Patch(SRSIndicators, Defaults(SRSIndicators), {January: Value(LookUp(Gallery6_3.AllItems, month=1).TextInput1_3.Text), February: Value(LookUp(Gallery6_3.AllItems, month=2).TextInput1_3.Text), March: Value(LookUp(Gallery6_3.AllItems, month=3).TextInput1_3.Text), April: Value(LookUp(Gallery6_3.AllItems, month=4).TextInput1_3.Text), May: Value(LookUp(Gallery6_3.AllItems, month=5).TextInput1_3.Text), June: Value(LookUp(Gallery6_3.AllItems, month=6).TextInput1_3.Text), July: Value(LookUp(Gallery6_3.AllItems, month=7).TextInput1_3.Text), August: Value(LookUp(Gallery6_3.AllItems, month=8).TextInput1_3.Text), September: Value(LookUp(Gallery6_3.AllItems, month=9).TextInput1_3.Text), October: Value(LookUp(Gallery6_3.AllItems, month=10).TextInput1_3.Text), November: Value(LookUp(Gallery6_3.AllItems, month=11).TextInput1_3.Text), December: Value(LookUp(Gallery6_3.AllItems, month=12).TextInput1_3.Text)}); Patch(colSRS, LookUp(colSRS, ID=ThisItem.ID), {January: Value(LookUp(Gallery6_3.AllItems, month=1).TextInput1_3.Text), February: Value(LookUp(Gallery6_3.AllItems, month=2).TextInput1_3.Text), March: Value(LookUp(Gallery6_3.AllItems, month=3).TextInput1_3.Text), April: Value(LookUp(Gallery6_3.AllItems, month=4).TextInput1_3.Text), May: Value(LookUp(Gallery6_3.AllItems, month=5).TextInput1_3.Text), June: Value(LookUp(Gallery6_3.AllItems, month=6).TextInput1_3.Text), July: Value(LookUp(Gallery6_3.AllItems, month=7).TextInput1_3.Text), August: Value(LookUp(Gallery6_3.AllItems, month=8).TextInput1_3.Text), September: Value(LookUp(Gallery6_3.AllItems, month=9).TextInput1_3.Text), October: Value(LookUp(Gallery6_3.AllItems, month=10).TextInput1_3.Text), November: Value(LookUp(Gallery6_3.AllItems, month=11).TextInput1_3.Text), December: Value(LookUp(Gallery6_3.AllItems, month=12).TextInput1_3.Text)})

 

If the above code is allowed, a new record is added to your data source. There is a problem with the description code "LookUp(SRSIndicators, ID=ThisItem.ID && Year=2020)".(The code cannot find the specified record and cannot be updated)

Best Regards,

Bof

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Tech Marathon

Maratón de Soluciones de Negocio Microsoft

Una semana de contenido con +100 sesiones educativas, consultorios, +10 workshops Premium, Hackaton, EXPO, Networking Hall y mucho más!

Top Solution Authors
Top Kudoed Authors
Users online (6,593)