cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ShaneITAutomate
Helper V
Helper V

Visible if statment not working

Hi i have a forms app where i have a If Statement on the visible function of several datacards.

 

On the start page of the app the users select the vehicle and the service type 250, 500, 1000 or 2000 and that number is displayed on a label on the following screen, so i set the following if statement on the visible part of the datacard as if they select 2000 they should see all the datacards and if they select 500 for example they should only see the 250 and 500 parts, however it is not working,

 

To show all i would use

 

If(Value(DCVSMUTop.Text) = 250 || 500 || 1000 || 2000, true,false)

 

To show just 500 i would use

 

If(Value(DCVSMUTop.Text) = 250 || 500, true,false)

 

PS. DCVSMUTop is the name of the label on the top part of the screen

 

Could someone tell me where im wrong?

 

Thanks

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
CNT
Super User
Super User

@ShaneITAutomate Try this,

With({varDCVSMUTop:Value(DCVSMUTop.Text)},
 varDCVSMUTop = 250 || varDCVSMUTop = 500 || varDCVSMUTop = 1000 || varDCVSMUTop = 2000
)

View solution in original post

5 REPLIES 5
pat_aus
Frequent Visitor

Hi ShareITAutomate,

 

Try the following

 

If(Value(DCVSMUTop.Text) = 250 || Value(DCVSMUTop.Text) = 500 || Value(DCVSMUTop.Text) = 1000 || Value(DCVSMUTop.Text) = 2000, true,false)

 

If(Value(DCVSMUTop.Text) = 250 || Value(DCVSMUTop.Text) = 500, true,false)

 

CNT
Super User
Super User

@ShaneITAutomate Try this,

With({varDCVSMUTop:Value(DCVSMUTop.Text)},
 varDCVSMUTop = 250 || varDCVSMUTop = 500 || varDCVSMUTop = 1000 || varDCVSMUTop = 2000
)

View solution in original post

Drrickryp
Super User
Super User

@ShaneITAutomate 

As @CNT shows in his formula, it is almost never necessary to use an If() statement with Visible when the formula by itself reduces to either true or false. 

ignore first thing monday had a brain fart

ignore first thing monday had a brain fart

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Top Kudoed Authors
Users online (1,009)