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
User Groups Public Preview

Join us for our User Group Public Preview!

Power Apps User Groups are coming! Make sure you’re among the first to know when user groups go live for public preview.

Power Apps Community Call

Monthly Power Apps Community Call

Did you miss the call?? Check out the Power Apps Community Call here!

Power Platform ISV STudio

Power Platform ISV Studio

ISV Studio is the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.

Top Solution Authors
Top Kudoed Authors
Users online (61,545)