cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
send2mark
Resolver III
Resolver III

Show/Hide based on two values

Ok so this works Visible=(DataCardValue5.Value=true)||(Value(DataCardValue6.Text) >20)

I am trying to put in a label that is the opposite so when these are not true the label shows instead.

 

If I have the DataCardValue5.Value=true it works fine. The issue comes when I enter the second section. 

This is what I am trying to use but is not working. 

Visible=(DataCardValue5.Value=false)||(Value(DataCardValue6.Text) <=20)

1 ACCEPTED SOLUTION

Accepted Solutions

I got it to work using &&

!DataCardValue5.Value && Value(DataCardValue6.Text) <=20

View solution in original post

10 REPLIES 10
Anonymous_Hippo
Super User
Super User

Hello @send2mark !!

 

Can you please explain the logic for this statement Value(DataCardValue6.Text) >20. What exactly are you trying to do ?

 

Thanks

If the number is more than 20 then other labels will show giving more direction. If it is 20 or under then I want other labels to show.

@send2mark 

DataCardValue5.Value=false || (Value(DataCardValue6.Text)<=20 && !IsBlank(DataCardValue6.Text))

Does this solve your issue ? 

 

Cheers !!

@send2mark 

if(DataCardValue5.Value=false || (Value(DataCardValue6.Text)<=20,true,false)

Put above coding in your visible property  (what do you need to show visible)
Above coding / condition is true, Visible true, false means visible false.

 

if you need to change 20 or less visible false means use below code

if(DataCardValue5.Value=false || (Value(DataCardValue6.Text)<=20,false,true)​​


I hope, your problem will be resolved.

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways or you liked the post and want to show some appreciation, please give it a Thumbs Up.

This is making me crazy. I can only seem to do one or the other, not both at the same time, and using the if statement says there is an error and suggests that I revise it.

Drrickryp
Super User
Super User

@send2mark 

Just to stick my nose in, There is no need for an If() statement in a Visible property. 

Value(DataCardValue6.Text<=20)  and  DataCardValue5.Value each reduce to true or false

so if you want to show your label simply

!DataCardValue5.Value || Value(DataCardValue6.Text) <=20 should be sufficient

When I click into these they both say false. So if they both say false it should not show correct?

send2mark_0-1652147363810.png

 

Drrickryp
Super User
Super User

Correct

So if the logic is correct and they both show false what else could it be?

Helpful resources

Announcements
Super User 2 - 2022 Congratulations 768x460.png

Welcome Super Users

The Super User program for 2022 - Season 2 has kicked off!

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

<
Users online (2,991)