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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Label visible based on...
Power Apps
Suggested Answer

Label visible based on Combobox

(2) ShareShare
ReportReport
Posted on by 35
Hello Everyone,
 
In PowerApps form I have a combobox. In SharePoint list it is a text column. I do have a label 'Please enter a value' on the same screen. I want to show the label text when screen loads and combobox is empty or if user doesn't select any value in combobox. I have tried IsBlank, IsEmpty and CountRows. None of them is working when the screen loads. The label comes hidden when screen loads. However, when you select an item in combobox and deselect it (combobox becomes empty), the label become visible.
 
I have tried following: 
IsBlank(cmbSkills.Selected.'Skills Required')||CountRows(cmbSkills.SelectedItems)=0
 
IsBlank(cmbSkills.Selected.'Skills Required')
 
IsEmpty(cmbSkills.SelectedItems)
 
CountRows(cmbSkills.SelectedItems)=0
 
Please help. I want to show the label text when screen loads or nothing is selected in combobox. 
 
FYI, I am using custom columns and patching the values of columns to SharePoint list. 
 
 
Categories:
I have the same question (0)
  • Suggested answer
    stampcoin Profile Picture
    5,058 Super User 2025 Season 2 on at
    I think when you assign Lable's Visible = IsEmpty( cmbSkills.SelectedItems ). this works for me.
     
    Or you may consider using InputTextPlaceholder  Property of Combox.
    You can assign InputTextPlaceholder="Please enter a value"
     
  • Suggested answer
    Michael E. Gernaey Profile Picture
    53,442 Super User 2025 Season 2 on at
     
    Assuming you are putting this in the Visible property, then to me the question isn't why it's not working, the question is why these are giving wrong outputs.
     
    Is this a Multi or Single Select ComboBox as that matters.
     
    What is cmbskills Parent (since its a Form you said) and what are the Items set to ?Do you have a DefaultSelectedItems Set as that will cause the issue (initially) and explain why when you check uncheck it works.
     
    For instance for kicks if you took this code
     
    CountRows(cmbSkills.SelectedItems)=0
     
    And added just a random label in the form and put
    Text(CountRow(cmbSkills.SelectedItems))
     
    What does it say?
     
    it will either say -1, 0 or > 0 if its > 0 then DefaultSelectedItems is messing with you. Or you are honestly its a gremlin
     
    What you need to do is prove that your expressions are producing what you expect.
    Then resolving why it doesn't make it visible/invisible is easier.
     
    You can even try putting a Reset for the Label in the Onvisible, and well as for the Combobox which should force it to essentially do your click/unclick
  • MS-19111917-0 Profile Picture
    35 on at
    @Michael E. Gernae@stampcoin Thank you for the responses. Digging more into it helped in figuring out the issue. The problem was my label text. I was using If(IsEmpty(cmbItSkills.SelectedItems), "Please enter a value", ""). Replacing it with "Please enter a value" helped and I was able to show and hide label with IsBlank(cmbSkills.Selected.'Skills Required')||CountRows(cmbSkills.SelectedItems)=0
     
    Appreciate your support.
  • stampcoin Profile Picture
    5,058 Super User 2025 Season 2 on at
    This is the best when you figured out yourself, well done.

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 739 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard