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

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
thirdimage

Coming Soon: T-Shirt Design Contest

Keep your eyes open for our upcoming T-shirt design contest!

thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

Top Solution Authors
Top Kudoed Authors
Users online (4,711)