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

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Advice on updating fro...
Power Apps
Answered

Advice on updating from SharePoint lists

(0) ShareShare
ReportReport
Posted on by 364

Morning all,

 

I am in a bit of quandry. My app connects to a number of SharePoint lists that perform lookups against inputted data. For example, someone says they manage 25 clients, and for these clients chooses category A. Category A means that according to the Sharepoint lookup table, for every client, you are given 1 hour of work, plus 1 hour for preparation. That means that the final number of hours assigned to that person, and what is uploaded to my database, is 50. I would also upload the Category chosen, and quantity of 25 to represent the clients. 

 

So, now my problem. I am expecting to have to revise the SharePoint Lists fairly soon, and change some of the calculations. So in the above example, the calculation might now say for every client you get 1 hours plus 0.5 hours for preparation. I will need to cascade these changes to all existing records.

 

I'm thinking that pulling all my records into Powerapps and then running a fresh patch on them might work, but I'm not sure. Can you guys think of any way that I could get these changes to all the already uploaded records?

 

Cheers,

 

Matt

Categories:
I have the same question (0)
  • eka24 Profile Picture
    20,923 on at

    Try:

    Patch( YourList, First( Filter( YourList, ColumnName = "1" ) ), { ColumnName : "1.5" } )

     

    You can also read this post if it does not work

    https://powerusers.microsoft.com/t5/Building-Power-Apps/Update-Sharepoint-list-by-incrementing-value/m-p/509719

     

    If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

  • EpicTriffid Profile Picture
    364 on at

    Hi @eka24 ,

     

    Thankyou for the suggestion, but I'm not sure if changing the SP list itself would cascade those changes through all current records in my database, unless im wrong?

  • eka24 Profile Picture
    20,923 on at

    My understanding is that wherever you see 1, change it to 1.5

    in that column. if that is the case, the reply would work.

  • Verified answer
    v-xida-msft Profile Picture
    Microsoft Employee on at

    Hi @EpicTriffid ,

    Could you please share a bit more about your scenario?

    Do you want to update all existing records in your SP List to apply the new Calculation rule?

     

    Based on the needs that you mentioned, I think UpdateIf function could achieve your needs. Please consider set the OnSelect property of a "Update" button to following:

    UpdateIf(
     'Your SP List',
     true,
     {
     TotalHour: Quantity * 1.5
     }
    )

    Note: The TotalHour represents the column in your SP list to store the total hours assigned to that user. The Quantity represents the column in your SP List to store the quantity of clients for each user. Please replace them with actual column name in your SP List

     

    In addition, you could also consider achieve your needs using ForAll function and Patch function, please take a try with the following formula (set the OnSelect property of a "Update" button to following):

    ForAll(
     RenameColumns('Your SP List', "ID", "ID1"),
     Patch(
     'Your SP List',
     LookUp('Your SP List', ID = ID1),
     {
     TotalHour: Quantity * 1.5
     }
     )
    )

     

    Please take a try with above solution, then check if the issue is solved.

     

    Best regards,

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 254 Most Valuable Professional

#2
Kalathiya Profile Picture

Kalathiya 211 Super User 2026 Season 1

#3
VASANTH KUMAR BALMADI Profile Picture

VASANTH KUMAR BALMADI 195

Last 30 days Overall leaderboard