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 / IF Else Datacard Visib...
Power Apps
Unanswered

IF Else Datacard Visible based on name from Global Address List

(0) ShareShare
ReportReport
Posted on by

Hi All,

Im looking to do the following:

 

I have 8 inputs for team members on a nomination form. There can be up to 8 nominations that then go to be approved. I want to show only those names that have a nomination. If there is no name, I want to hide that data card. Im stumped. Any ideas? Ive already tried below: If(IsBlank(H.Selected.value,false,true)

 


2021-01-06_11-27-54.png

Categories:
  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @apirez 

    Your formula is generally correct.  You should have the following in your DataCard Visible property - assuming that H is the name of the dropdown control for Team Member:

       !IsBlank(H.Selected.Value)

     

    The next question would be, how are you defining "blank" for the dropdown?  Do you have "Allow blank values" enabled for that control?

  • apirez Profile Picture
    on at

    Hi Randy,

    When I use that formula, its not working. I did it in the reverse to make sure that it works. So If the value in H is not blank, show and its hiding it...I believe that it allows blank responses. How do I check? T hanks so much! 

     

    If(!IsBlank(H.Selected.value,true,false)

    If(!IsBlank(H.Selected.value),false,true). I am getting these error...Error 1.pngError 2.png

     

     

     

  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @apirez 

    So again, if H is a dropdown control, then, depending on the Items property of the control, your visible formula should be:    !IsBlank(H.Selected.Value)  (Note: no need for if and true and false)

     

    Please confirm the following for me:

    1) H is the name of the Dropdown control on your screen

    2) If it is a dropdown, then the Items property for the dropdown.

    3) If it is a dropdown, then look at the AllowEmptySelection property of it and verify that it is true

  • apirez Profile Picture
    on at

    Hi Randy,
    Its not a dropdown. Its a Name field that connects to the Global Address List that pull people from the organization. Thanks! 

  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @apirez 

    So then is it a Combobox?  From your picture, it has a dropdown icon on the right of the control...that indicates that it is either a dropdown or a combobox. 

    If if is a combobox, then change your Visible property to the following:

       CountRows(H.SelectedItems)>0

  • apirez Profile Picture
    on at

    Hi randy,

    I tried that and I get the same result either way that I show the < sign. Am I missing something?1.png2.png

  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @apirez 

    So I am not seeing that in your pictures, change the formula in the Visible property of the datacard to:

       CountRows(H.SelectedItems)>0

     

    In your pictures, beside the extraneous If statement, I see 'G' in it.

  • apirez Profile Picture
    on at

    Hi Randy,

    G  is the card above. Im trying to test this on an empty field, so I went up one. I thought it was in the Visible of the Datacard?

  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @apirez 

    Ah, got it...thought it was an overlooked typo.

     

    Yes, then the Visible property will respond properly, again, if H (or G for that matter) is a Combobox, then setting the visible property of the DataCard to CountRows(H.SelectedItems)>0 will set the visibility.

     

    In the below image, there are three datacards, one (with a combobox called DataCardValue65).  The other two are just random datacards that have a Visible property set to CountRows(DataCardValue65.SelectedItems)>0

    RandyHayes_0-1609967127358.png

     

    apirez.gif

     

     

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
11manish Profile Picture

11manish 411 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 338

#3
WarrenBelz Profile Picture

WarrenBelz 256 Most Valuable Professional

Last 30 days Overall leaderboard