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 / Show form field if any...
Power Apps
Unanswered

Show form field if any of 4 of 7 dropdown items selected

(0) ShareShare
ReportReport
Posted on by 20

I can't seem to find the answer to this.

 

I have a form, I want to hide a field unless one of these four of the seven total choices in a drop down is selected.

 

For example, I want the field to show if the user selects:

Item 1

Item 3

Item 5

Item 7

 

But not show if the user selects:

Item 2

Item 4

Item 6

 

I know how to use If(DataItem = "Item 1", true,false) but when I try to list out the items in this formula, I get a warning that says "Expecting a true or false value. The current value may cause unexpected behavior."

Categories:
  • TheRobRush Profile Picture
    11,128 Moderator on at

    As an example I made a combobox control with an items property of 

    [1,2,3,4,5,6,7,8,9]

    set allow multiple selections to true and then 

    made another control and set its visibility to 

    Or(1 in ComboBox1.SelectedItems.Value,3 in ComboBox1.SelectedItems.Value,5 in ComboBox1.SelectedItems.Value,7 in ComboBox1.SelectedItems.Value)

    now no matter how many items i select on my combobox if 1 of them is on that list, the control appears

  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    @maquinn1978 

    In the visible property of the field:

    Dropdown1.Selected.Value = Option1||Option3||Option5||Option7

    No If() is needed as the statement will reduce to either true or false.

  • maquinn1978 Profile Picture
    20 on at

    I still want them to only pick one. But the field can be visible on any of the 4 if chosen. Does that make sense?

  • maquinn1978 Profile Picture
    20 on at

    I have:

     

    DataCardValue15.Selected.Value = "PC"||"Life/Health"||"Rep Assignments"||"Misc."

     

    And that is not working.

  • SanjaKan Profile Picture
    49 on at

    Hi!

    I had a similar issue and solved it like this:

    Visible= If(DataCardvalue15.Selected.Name="Choice1" Or DataCardvalue15.Selected.Name="Choice2" Or DataCardvalue15.Selected.Name="Choice3" Or DataCardvalue15.Selected.Name="Choice4";true;false)

     

    I hope it helps!

  • maquinn1978 Profile Picture
    20 on at

    No I get a "Incompatible types for comparison. These types can't be compared: Boolean, Text. But if I just try one of the options it works, so adding the OR with all the other items breaks it.

  • maquinn1978 Profile Picture
    20 on at

    I figured it out. The || was correct, but if you have to put in the DataCardName.Selected.Value = "Item" for every option. Then it works fine.

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

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 405 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 368

#3
WarrenBelz Profile Picture

WarrenBelz 244 Most Valuable Professional

Last 30 days Overall leaderboard