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 Apps
Unanswered

powerapps patch

(0) ShareShare
ReportReport
Posted on by 349

Trying to get syntax right for a patch.

Im in powerapp form for vacation requests and going back to the employee master to update fields there.

Emergency Hours Used is a field on the master

I need to set this field = to a calculation of that field and the hours which is on the request form.

Cant figure out how to reference the emergency hours left in the subtraction 

 

Patch('Lyn Employees',First(Filter('Lyn Employees',Clock_x0020_Number=DataCardValue3.Text)), { Emergency_x0020_Hours_x0020_Used:Emergency_x0020_hours_x0020_left -Value(DataCardValue31.Text), 

Categories:
I have the same question (0)
  • WarrenBelz Profile Picture
    155,544 Most Valuable Professional on at

    Hi @dmclaughlin ,

    Try the below

    With(
     {
     wUsed:
     LookUp(
     'Lyn Employees',
     Clock_x0020_Number=DataCardValue3.Text
     )
     }, 
     Patch(
     'Lyn Employees',
     {ID:wUsed.ID},
     {
     Emergency_x0020_Hours_x0020_Used:
     wUsed.Emergency_x0020_hours_x0020_left - Value(DataCardValue31.Text)
     }
     )
    )

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    Visit my blog Practical Power Apps

  • WarrenBelz Profile Picture
    155,544 Most Valuable Professional on at

    Hi @dmclaughlin ,

    Just checking if you got the result you were looking for on this thread. Happy to help further if not.

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    Visit my blog Practical Power Apps

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 Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 387

#2
timl Profile Picture

timl 340 Super User 2026 Season 1

#3
Vish WR Profile Picture

Vish WR 301

Last 30 days Overall leaderboard