web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / beginner question abou...
Power Apps
Answered

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

(0) ShareShare
ReportReport
Posted on by 359
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.
Screen Shot 2019-06-20 at 9.08.02 AM.png
Categories:
I have the same question (0)
  • Pstork1 Profile Picture
    69,657 Most Valuable Professional on at

    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)
  • cchan000 Profile Picture
    359 on at

    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.

    issue.png
  • Verified answer
    v-yutliu-msft Profile Picture
    Microsoft Employee on at

    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

     

  • cchan000 Profile Picture
    359 on at

    you a genius. it worked.

  • cchan000 Profile Picture
    359 on at

    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)

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 356 Most Valuable Professional

#2
11manish Profile Picture

11manish 225 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 211

Last 30 days Overall leaderboard