cancel
Showing results for
Did you mean:
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
)```
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
)```
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.

Announcements

#### 'Better Together’ Contest Finalists Announced!

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

#### Power Apps Community User Group Member Badge

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

#### Join THE global Microsoft Power Platform event series

Attend for two days of expert-led learning and innovation on topics like AI and Analytics, powered by Dynamic Communities

#### Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

#### Microsoft Business Applications Virtual Launch

Join us for the Microsoft Business Applications Virtual Launch Event on Thursday, April 2, 2020, at 8:00 AM PST.

#### 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 (9,284)