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

Community site session details

Session Id : HSp3YMwggq+VC9rC3lUKgd
Power Apps - Building Power Apps
Answered

Visible if Dropdown value is one of many choices

Like (0) ShareShare
ReportReport
Posted on 24 Oct 2022 21:04:55 by 46

Hello Group!

 

I have a form where I want to show/hide visibility to several datacards based on the selection from the dropdown menu. 

DataCardValue13 - stores my dropdown list.  The list is:

  • Burn
  • Caught by
  • Struck by
  • Alergic Reaction
  • Vehicle
  • Chemical
  • Food
  • Missing Property
  • Miscellaneous

The goal is to show DataCard1 if DataCardValue13 equals: Burn, Caught By, Struck by, Alergic Reaction

However Hide DataCard 1 if DataCardValue13 equals: Vehilce, Micellaneous or Missing Property

 

I have several DataCards I want to show/hide based on the selection from DataCardValue13

 

Can I do this?  It has to be a visible if AND command but I just can not figure it out.

 

Thank you in advance!

 

I have the same question (0)
  • Damin Profile Picture
    63 on 24 Oct 2022 at 21:09:58
    Re: Visible if Dropdown value is one of many choices

    Hello, I advice you  to use Business Rules

  • Drrickryp Profile Picture
    Super User 2024 Season 1 on 24 Oct 2022 at 21:24:13
    Re: Visible if Dropdown value is one of many choices

    @Will_Y 

    Nonsense!.  Set the Visible property of the card to  

    DataCardValue13.Text = Or( "Burn", "Caught By","Struck by", "Allergic Reaction")

    This formula reduces to either true or false. 

  • Will_Y Profile Picture
    46 on 25 Oct 2022 at 18:07:22
    Re: Visible if Dropdown value is one of many choices

    Could you give me the whole formula you are referring to?  When I enter what you listed in the Visible property it does not work.  The .text is not a valid function.  I also tried the below which did not work 😞

     

    DataCardValue18.Selected.Value = Or("Burn", "Theft", "Stolen Vehicle")

     

    Thanks

  • AaronKnox Profile Picture
    514 Super User 2024 Season 1 on 25 Oct 2022 at 21:00:26
    Re: Visible if Dropdown value is one of many choices

    You may want to try:

    DataCardValue18.Selected.Value in ["Burn", "Theft", "Stolen Vehicle"]
  • Verified answer
    Will_Y Profile Picture
    46 on 07 Feb 2023 at 18:58:13
    Re: Visible if Dropdown value is one of many choices

    Just wanted to share the solution I found.  The challenege what to display a field only if one of these selections was chosen otherwise keep the field hidden.  By stacking the selected value using the "||" command I was able to get it to work.  Basically if any of these values where selected the visible field was "true" otherwise "false".

     

    Hope this helps others.

     

    If(

    DataCardValue18.Selected.Value="Burn"

    ||

    DataCardValue18.Selected.Value="Allergic  Reaction"

    ||

    DataCardValue18.Selected.Value="Assault"

    ||

    DataCardValue18.Selected.Value="Caught in/by/between"

    ||

    DataCardValue18.Selected.Value="Chemical"

    ||

    DataCardValue18.Selected.Value="Death Investigation"

    ||

    DataCardValue18.Selected.Value="Food Illness"

    ||

    DataCardValue18.Selected.Value="Improper Lifting"

    ||

    DataCardValue18.Selected.Value="Insect Bites"

    ||

    DataCardValue18.Selected.Value="Medical Aid"

    ||

    DataCardValue18.Selected.Value="Slip/Trip/Fall"

    ||

    DataCardValue18.Selected.Value="Struck by object"

    ,true,false)

     

    Same formula just without breaks:

    If(DataCardValue18.Selected.Value="Burn"||DataCardValue18.Selected.Value="Allergic Reaction"||DataCardValue18.Selected.Value="Assault"||DataCardValue18.Selected.Value="Caught in/by/between"||DataCardValue18.Selected.Value="Chemical"||DataCardValue18.Selected.Value="Death Investigation"||DataCardValue18.Selected.Value="Food Illness"||DataCardValue18.Selected.Value="Improper Lifting"||DataCardValue18.Selected.Value="Insect Bites"||DataCardValue18.Selected.Value="Medical Aid"||DataCardValue18.Selected.Value="Slip/Trip/Fall"||DataCardValue18.Selected.Value="Struck by object",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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Chiara Carbone – Community Spotlight

We are honored to recognize Chiara Carbone as our Community Spotlight for November…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 714 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 419 Super User 2025 Season 2

#3
developerAJ Profile Picture

developerAJ 243

Last 30 days Overall leaderboard
Loading started
Loading complete