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 / Formula onSelect butto...
Power Apps
Unanswered

Formula onSelect button > if datacardvalue = Cancelled > then do patch (StockList) + (RequestList)

(0) ShareShare
ReportReport
Posted on by

Hi, I'm building an stationary apps and currently have 2 sharepoint list (Stock List & Request List). I'm stuck here where when update button is clicked, onSelect formula if the delivery status is = cancelled, then do patch stock list > In-Stock will add (+) the request quantity and the value will be 10 again.

 

 

Thanks for all the help.

StockRequest.jpg
Categories:
  • Ami K Profile Picture
    15,689 Super User 2024 Season 1 on at

    @fauzi - not clear on what you have in the Items property for the Delivery Status dropdown, and assuming you want to do this using a Patch function, the pattern below should give you some direction:

     

     

    With(
     {
     _stock: LookUp(
     'MBI Stationary - Stock List',
     'Product ID' = "Some ID",
     'In-Stock'
     )
     },
     With(
     {
     _request: LookUp(
     'BI Stationary - Request List',
     ID = "Some ID",
     Qty
     )
     },
     If(
     'Your Dropdown'.Selected.Value = "Cancelled",
     Patch(
     'MBI Stationary - Stock List',
     LookUp(
     'MBI Stationary - Stock List',
     ID = "Some ID"
     ),
     {'In-Stock': (_request + _stock)}
     )
     )
     )
    )
    

     

     

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

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 409 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 252 Most Valuable Professional

Last 30 days Overall leaderboard