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

#### Watch Sessions On Demand!

Continue your learning in our online communities.

#### Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

#### Power Platform World Tour

Coming to a city near you

#### PowerApps Community User Group Member Badge

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

#### Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

#### Power Platform Summit North America

Register by September 5 to save \$200

Top Kudoed Authors
Users Online
Currently online: 122 members 4,592 guests
Recent signins: