cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Toasteroven
Advocate II
Advocate II

Cant use patch with an and statement

I want a button on select to perform a patch and update the context of a variable. the patch works by itself and the update context works by itself. But when i use the && operator to do both at once it says that i have an invalid argument type. Is there something about the patch funtion that doesn't allow it to be used with an and operator?

 

syntax im using 


UpdateContext({error2_v:false}) && patch(......)

 

Both work perfectly on their own 

 

Thanks

1 ACCEPTED SOLUTION

Accepted Solutions
CarlosFigueira
Power Apps
Power Apps

If you want to perform multiple operations in a single statement (on behavior properties), you should use the ; operator (or ;;, depending on the language😞

UpdateContext({error2_v:false}); Patch(......)

View solution in original post

2 REPLIES 2
CarlosFigueira
Power Apps
Power Apps

If you want to perform multiple operations in a single statement (on behavior properties), you should use the ; operator (or ;;, depending on the language😞

UpdateContext({error2_v:false}); Patch(......)

View solution in original post

Simple, precise and exactly what i needed! Thankyou very much!

 

You da bomb!

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Top Kudoed Authors
Users online (2,571)