web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Powerapp no longer sav...
Power Apps
Unanswered

Powerapp no longer saving to sharepoint and updating

(0) ShareShare
ReportReport
Posted on by 97

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

Categories:
  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    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.

  • v-bofeng-msft Profile Picture
    Microsoft Employee on at

    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

  • jjasper Profile Picture
    97 on at

    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

  • v-bofeng-msft Profile Picture
    Microsoft Employee on at

    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

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 221 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 188 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 120

Last 30 days Overall leaderboard