cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Super User
Super User

How to If( var1, x, var1 && var2 y, y) ?

Hello, 

 

I'm trying to set BorderThickness of a label (highlight it) depending on variables but I'm having trouble. 

 

  • BorderThickness: 
    • If var1 = true, set thickness to 4
    • If var1 AND var2 = true, set thickness to 0. 
    • Else set thickness to 0.

I don't know the function for making this work. Because when var1 = true, the thickness remains at 4 even when var2 also goes true. 

 

Ideas? Is this clear enough? 

 

Thanks

1 ACCEPTED SOLUTION

Accepted Solutions
Anonymous
Not applicable

Re: How to If( var1, x, var1 && var2 y, y) ?

If(
  var1 && !var2,
  4,
  0
)

If thickness is 4 only when var1 = true and var2 = false then use this function.

 

However if you have 3 levels of thickness (4 if only var1 = true, x if var1 and var2 = true, else 0) then you can use this:

If(
  var1 && !var2,
  4,
  var1 && var2,
  2,
  0
)

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Re: How to If( var1, x, var1 && var2 y, y) ?

If(
  var1 && !var2,
  4,
  0
)

If thickness is 4 only when var1 = true and var2 = false then use this function.

 

However if you have 3 levels of thickness (4 if only var1 = true, x if var1 and var2 = true, else 0) then you can use this:

If(
  var1 && !var2,
  4,
  var1 && var2,
  2,
  0
)

View solution in original post

Highlighted
Super User
Super User

Re: How to If( var1, x, var1 && var2 y, y) ?

Bingo! I now understand that I was missing the " ! ". 

 

Thank you very much for your assistance. 

Helpful resources

Announcements
secondImage

Demo-Extravaganza 2020

Check out these cool Power Apps & vote on your favorite!

secondImage

Robotic Process Automation

Let's talk about the solution provided by Microsoft for Robotic Process Automation (RPA)

secondImage

Community Highlights

Check out whats happening in Power Apps

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

Top Solution Authors
Top Kudoed Authors
Users online (6,070)