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 / Conditional patching i...
Power Apps
Suggested Answer

Conditional patching in power apps

(1) ShareShare
ReportReport
Posted on by 215
Hello,
 

I am currently developing a Power Apps application that includes several columns:
EngineeringRequired (Yes/No)
MarketingRequired (Yes/No)
OperationRequired (Yes/No)
QualityRequired (Yes/No)
 
Additionally, we have corresponding status columns:

EngineeringStatus (Text)
MarketingStatus (Text)
OperationStatus (Text)
QualityStatus (Text)
 
my Scenario is to patch
 
all column as set value their value when new request submitted.
 
but when i came edit that time my patch function need to look 

1.is EngineeringRequired column "true" the its look for EngineeringStatus need to "Approved" ,
2.same way MarketingRequired column true MarketingStatus column is "approve",
3.OperationRequired column is "false" then OperationStatus not consider any value ,
 4. QualityRequired is true column true then QualityStatus is "Approved",
 
after validating all column then need to patch 
Simple se
 
Please help in this condition
 

 
Categories:
I have the same question (0)
  • Suggested answer
    Michael E. Gernaey Profile Picture
    53,974 Moderator on at
    Hi,
     
    So you patch first and create a new item (correct???) Is this on a Form, or just in controls and you are using a real patch?
     
    Ok so you patched and have a new record and now you want to let them come back and make changes to the ***RequiredColumns.
     
    You would do something like this. (remember you need to know which record to patch
     
    //New Record
    Patch(MyDataSource, Defaults(MyDataSource),
         {
            Your Fields here and I do not know how to get the values because I don't have any details on where these are shown (form or just dropdowns or what)
         }
    )
     
    // Patching (updating)
    Patch(MyDataSource, LookUp(MyDataSource, XXX = XXX),
         {
             EngineeringRequired : true,
             EngineeringStatus : If(SomeControlForEngineeringRequiredf = true, "Approved")
         }
    );
     
    Thats the best I can do without having details about the Screens/Forms/Controls you are using, but its the answer.
     
     
     
     
     
  • ursNani Profile Picture
    215 on at
    Actually i want to patch in edit for existing record

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!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 600

#2
WarrenBelz Profile Picture

WarrenBelz 478 Most Valuable Professional

#3
Valantis Profile Picture

Valantis 322

Last 30 days Overall leaderboard