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
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

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