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 / Patch If Statement Help
Power Apps
Answered

Patch If Statement Help

(0) ShareShare
ReportReport
Posted on by 920 Super User 2024 Season 1

I have a dropdown - 

wonka1234_0-1702394411661.png

with a button below to patch the field  -

 

Patch('Intake', ThisItem, {'Action Owner': {Value :review_status_dropdown.Selected.Value}});

 

I am trying to add another line

 

If(ThisItem.'Action Owner'.Value = "Closed", Patch('Intake', ThisItem, {'Status_two': {Value : "Complete"}}),"");

 

Action Owner updates fine in my SP list.

However my status_two isnt being updated.

 

where am I going wrong?

 

Categories:
I have the same question (0)
  • wonka1234 Profile Picture
    920 Super User 2024 Season 1 on at

    bump

  • wonka1234 Profile Picture
    920 Super User 2024 Season 1 on at

    trying without the if Condition and still wont patch!

     

    Patch('Intake', LookUp('Intake', ID=gblRecordID), {Status_two: {Value: "Complete"}})

  • Verified answer
    LaurensM Profile Picture
    12,516 Moderator on at

    Hi @wonka1234😊

     

    Assuming the code is written within the same button, ThisItem will most likely not be updated before you run your second Patch statement (If statement condition returns false). To achieve your goal, you could reduce the code to 1 Patch with a conditional update parameter:

    Patch(
     'Intake', 
     ThisItem, 
     If(
     review_status_dropdown.Selected.Value = "Closed",
     {
     'Action Owner': {Value : "Closed"},
     'Status_two': {Value : "Complete"}
     },
     {
     'Action Owner': {Value :review_status_dropdown.Selected.Value}
     }
     )
    );

     

    If this solves your question, would you be so kind as to accept it as a solution & give it a thumbs up.

    Thanks!

  • wonka1234 Profile Picture
    920 Super User 2024 Season 1 on at

    Youre the man! thanks!

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 542 Most Valuable Professional

#2
Haque Profile Picture

Haque 206

#3
Kalathiya Profile Picture

Kalathiya 201 Super User 2026 Season 1

Last 30 days Overall leaderboard