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 / How to make a field vi...
Power Apps
Answered

How to make a field visible based on the selected item in a dropdown box

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi,

 

I'm trying to make a field visible based on what is selected in my dropdown box (DataCardValue11). The error message I'm getting is 'Incompatible types for Comparison'.

 

This is what I've tried:

 

If(
Or(
DataCardValue11.SelectedItems = "Not Accepted Major" ,
DataCardValue11.SelectedItems = "Not Accepted Minor" ,
DataCardValue11.SelectedItems = "Accept To Fit/Form/Function" ,
DataCardValue11.SelectedItems = "Accept No Issue"), true , false
)

 

Thanks for any help

Categories:
  • Ethan_009 Profile Picture
    4,840 Moderator on at

    Hi @Anonymous ,

     

    It seems the column is optionset/choices 

    Try the following code,

    If(
     Or(
     DataCardValue11.Selected.Value = Choices('fieldName (table-ListName)'.'Not Accepted Major'),
     DataCardValue11.Selected.Value = Choices('fieldName (table-ListName)'.'Not Accepted Minor'),
     DataCardValue11.Selected.Value = Choices('fieldName (table-ListName)'.'Accept To Fit/Form/Function'),
     DataCardValue11.Selected.Value = Choices('fieldName (table-ListName)'.'Accept No Issue')
     ),
     true, false
    )

     

    Hope this format helps

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi @Ethan_R,

     

    I'm not sure what I put as fieldName and table-listName as I'm inserting what I believe to be correct (and I've tried far too many different combinations) but am still getting errors. Could you elaborate please?

     

    Thanks

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @Ethan_R This is the closest I have got:

     

    Elliot13777_1-1684752567319.png

     

  • Verified answer
    Ethan_009 Profile Picture
    4,840 Moderator on at

    Hi @Anonymous ,

     

    What's the datatype of dropdown?

    Ok, can you try the following code:

    If(
     Or(
     DataCardValue11.Selected.Value = "Not Accepted Major"),
     DataCardValue11.Selected.Value = "Not Accepted Minor"),
     DataCardValue11.Selected.Value = "Accept To Fit/Form/Function"),
     DataCardValue11.Selected.Value = "Accept No Issue")
     ),
     true, false
    )

     

    Hope this helps

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 226 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 191 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 167

Last 30 days Overall leaderboard