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 / Hiding Datacard within...
Power Apps
Answered

Hiding Datacard within form problem

(0) ShareShare
ReportReport
Posted on by 22

Hi there,

 

I have a form that has a dropdown in a datacard which contains a Yes/No choice option.

 

I have another datacard that I only want visible if the dropdown choice = yes

 

I'm using the following formula but am getting a "incompatible type for comparison" error.

 

If(DataCardValue24_1.Selected.Value="Yes",true,false)

 

Any help would be much appreciated.

 

 

Categories:
I have the same question (0)
  • TheRobRush Profile Picture
    11,128 Moderator on at

    should change it to DataCardValue24_1.Selected.Value=1 or true, one of those should work (yes no column in sharepoint is boolean)

  • qwedwq Profile Picture
    22 on at

    Thanks - Unfortunately i'm getting the same error with either =1 or =true.

  • qwedwq Profile Picture
    22 on at

    I should also add that I am using dataverse rather than Sharepoint.

  • TheRobRush Profile Picture
    11,128 Moderator on at

    put a label next to your DataCardValue24 and set its text to

     DataCardValue24.Selected.Value

     so hyou can find out what the appropriate format is on your form

  • VaidasG Profile Picture
    469 on at

    hi @qwedwq 

     

    I managed to replicate your requirement, and it works perfectly well for me...

    nothing wrong with your formula, I used - If(DataCardValue26_6.Selected.Value = "Yes", true, false), if items inside your dropdown list are Strings!!! 

    Make sure you set this formula for DataCard Visible property of the card you want to hide

     

    Regards

  • qwedwq Profile Picture
    22 on at

    The label is returning "Yes" as the value, so not sure why the original formula I am using isn't working. 

  • VaidasG Profile Picture
    469 on at

    what do you have in the Items property of your dropdown?

  • qwedwq Profile Picture
    22 on at

    Here is what I have in the Items property:    Choices('Service? (Kaizen Job Sheets)')

     

    The formula I'm using to hide the datacard is in the visible property.

  • Verified answer
    VaidasG Profile Picture
    469 on at

    ahhhh, why don't you try - If(DataCardValue24_1.Selected.Value='Service? (Kaizen Job Sheets)'.Yes ,true, false)

     

    In this case you need to reference to Choice item, rather than label value

     

    Regards

  • qwedwq Profile Picture
    22 on at

    Thats worked - thank you so much 👍

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 551

#2
WarrenBelz Profile Picture

WarrenBelz 430 Most Valuable Professional

#3
Valantis Profile Picture

Valantis 298

Last 30 days Overall leaderboard