cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
DeemaEmadaldin
Helper II
Helper II

Visibility

Hello, 

 

I have a dropdown with 2 options (supply Fan Only, Supply & Return Fan) , I need the second option questions (data card)  to be shown only if selected in the dropdown.

I've used the following code in the visible control:

If(DataCardValue394 .Selected. Value="Supply & Return Fan", true, false)

 

now the questions not showing anymore in my form even when choosing that option.

 

Thanks in advance.

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @DeemaEmadaldin ,

 

Could you share the items property of  DataCardValue394. Also the exact item names present in the dropdown. I can only see Supply Fan in the screen shot and not supply Fan Only

 

Please try below code just to confirm if it the issue with item value not spelled correctly. Below code will work reversely but give it a try to check if items value given properly the code is working or not  

 

If(DataCardValue394.Selected.Value= "Supply Fan", true, false)

 

 

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, please consider giving it Thumbs Up.

 

If this post was helpful or you need more help please consider giving Thumbs Up and Tag me in your reply I'll be happy to help. If this post helped you solve your issue please click Accept as solution and provide Thumbs Up. This will help others find it more readily.

View solution in original post

6 REPLIES 6
PG_WorXz10
Resident Rockstar
Resident Rockstar

Hi @DeemaEmadaldin ,

 

Try below code. 

 

If(DataCardValue394.Selected.Value <> "Supply Fan Only", true, false)

 

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, please consider giving it Thumbs Up.

If this post was helpful or you need more help please consider giving Thumbs Up and Tag me in your reply I'll be happy to help. If this post helped you solve your issue please click Accept as solution and provide Thumbs Up. This will help others find it more readily.

eka24
Super User
Super User

You formula is ok but change it to:

DataCardValue394.Selected.Value="Supply & Return Fan"

 

However, are you hiding the same dropdown? 

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

Thank you for replying @PG_WorXz1

 

its showing now but with both options as its shown in the figure below, even when I'm choosing  supply fan only the Return fan (KW) and Return Fan Make questions appeared.

My formMy form

Thank for replying @eka24 

 

I tried the above code but didn't work.

questions were hidden for both options.

Hi @DeemaEmadaldin ,

 

Could you share the items property of  DataCardValue394. Also the exact item names present in the dropdown. I can only see Supply Fan in the screen shot and not supply Fan Only

 

Please try below code just to confirm if it the issue with item value not spelled correctly. Below code will work reversely but give it a try to check if items value given properly the code is working or not  

 

If(DataCardValue394.Selected.Value= "Supply Fan", true, false)

 

 

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, please consider giving it Thumbs Up.

 

If this post was helpful or you need more help please consider giving Thumbs Up and Tag me in your reply I'll be happy to help. If this post helped you solve your issue please click Accept as solution and provide Thumbs Up. This will help others find it more readily.

View solution in original post

gabibalaban
Super User
Super User

@DeemaEmadaldin ,

 

As @eka24 said, why are you using if clause in a boolean property like Visible:

 

If(DataCardValue394.Selected.Value= "Supply Fan", true, false)

 

Simplify the code using:

 

DataCardValue394.Selected.Value= "Supply Fan"

 

Back to your problem, most probably is given by text differences between DropDown control values and the hardcoded value you check. The code is ok. 

Hope it helps !

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (2,958)