cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
cchan000
Level: Powered On

beginner question about conditional visibility. please help, driving me mad.

Hi. I am extremely new to PowerApps but trying and eager to learn.
I have a SP list I am editing in Powerapps.
I have a dropdown that has two available choices, Black or White.
When someone chooses Black, I want another data card text box to appear.
In Tree View, when i go into the Black/White choice datacard, i see DataCardValue5 in it.
In the tutorial I learned to changed the visibility of the text box I want to change visibility by using a formula like this:
 
If(DataCardValue2.Value = true, true)
 
so I Tried this:
If(DataCardValue5.Value = Black, true)
 
this didn’t work. What am i doing wrong? I read that I have to find out the dropdown name? I thought it was DataCardValue5.
 
Any help please would be tremendously appreciated.
1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: beginner question about conditional visibility. please help, driving me mad.

Hi @cchan000 ,

DataCardValue5.Value can not be used to represent the drop down's selected item.

I suggest you try this

If(DataCardValue5.Selected.Value="Linear",true,false)

 

Best regards,

Community Support Team _ Phoebe Liu

 

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

5 REPLIES 5
Dual Super User
Dual Super User

Re: beginner question about conditional visibility. please help, driving me mad.

The value you are setting in your dropdown is a string.  You have to test it as a string .  Use the following code instead.

If(DataCardValue5.Value = "Black", true,false)


-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
cchan000
Level: Powered On

Re: beginner question about conditional visibility. please help, driving me mad.

Hi! Unfortunately it doesn't work.

 

It says Name isn't valid. This identifier isn't recognized.

 

I used black/white as an example, but the drop down selection is actually Linear/NonLinear (which is in the screenshot).

 

Please see attached screenshot.

Community Support Team
Community Support Team

Re: beginner question about conditional visibility. please help, driving me mad.

Hi @cchan000 ,

DataCardValue5.Value can not be used to represent the drop down's selected item.

I suggest you try this

If(DataCardValue5.Selected.Value="Linear",true,false)

 

Best regards,

Community Support Team _ Phoebe Liu

 

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

cchan000
Level: Powered On

Re: beginner question about conditional visibility. please help, driving me mad.

you a genius. it worked.

cchan000
Level: Powered On

Re: beginner question about conditional visibility. please help, driving me mad.

one more question please.

 

what if i want it to be visible if a user selects Black or White from the dropdown.

 

the below did not work.

 

If(DataCardValue5.Selected.Value="Black" or "White",true,false)

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

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

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors (Last 30 Days)
Users online (4,813)