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
New Ranks and Rank Icons in April

'New Ranks and Rank Icons in April

Read the announcement for more information!

Better Together’ Contest Finalists Announced!

'Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

thirdimage

Community Summit North America

Innovate, Collaborate, Grow - The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (10,421)