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(......)

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

 

You da bomb!

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (3,485)