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 / Power Apps Button to U...
Power Apps
Answered

Power Apps Button to Update Sharepoint List item

(0) ShareShare
ReportReport
Posted on by

what is the recommended ways to update an item in Microsoft List (a predefined number) by reducing it by X number for every Power App Button press.

 

let say i have 100 unit and every Button Press will reduce it by 1

Categories:
  • Verified answer
    CNT Profile Picture
    10,921 Super User 2024 Season 1 on at

    @FureYang use the Patch function. Patch(listName, recordToUpdate, {value:existingValue-1})

  • FureYang Profile Picture
    on at

    Hi @CNT, Alright will try it out .... THX!

  • FureYang Profile Picture
    on at

    I have tried to edit as such:

    OnSelect: fx= Patch(NumberControlTest,ThisItem.Quota,{Value:ThisItem.Quota-1})

     

    But it seems that the formula have errors. likely defined incorrectly for "{Value:ThisItem.Quota-1}" part.

  • CNT Profile Picture
    10,921 Super User 2024 Season 1 on at

    @FureYang can I see a screen shot with the error?

  • FureYang Profile Picture
    on at

    FureYang_0-1638265438929.png

    The app is to update a Microsoft List item. So i was intended to make a button to update the Quota Column as I select the Button.

  • CNT Profile Picture
    10,921 Super User 2024 Season 1 on at

    @FureYang I see only the red lines but not the Error Message! Hoover over the red line to see the error message. Also, what is the data type of the Quota column?

  • FureYang Profile Picture
    on at

    Sorry about that. 
    Here is the error message: Invalid argument type (Number). Expecting a record value instead.

    The Column is defined as a number by the way.

  • CNT Profile Picture
    10,921 Super User 2024 Season 1 on at

    @FureYang The Value column in NumberControlTest is expecting a record. I'm not sure what is the structure of this? Can you provide all the details please?

  • FureYang Profile Picture
    on at

    Sure. I'm trying to create an App out of Microsoft List.
    So the list looks as such:

    FureYang_0-1638266401752.png

    Then Integrate it to Power Apps.

    FureYang_1-1638266530656.png

     

    Then, from the Edit Form page, i am trying to insert a button for the Quota item to update its value.

    FureYang_2-1638266593854.png

     



  • Verified answer
    CNT Profile Picture
    10,921 Super User 2024 Season 1 on at

    @FureYang The 2nd argument in the Patch should be just ThisItem

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 383 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 356

#3
WarrenBelz Profile Picture

WarrenBelz 232 Most Valuable Professional

Last 30 days Overall leaderboard