cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Display Label if Browse Gallery is Empty

I'm currently using a calendar function/form that lets the user browse for an Employees jobs on a selected date. If the date matches any jobs they have on that date then they're populated in the browse gallery for the user to see.

 

What I'm trying to do now is if there are no jobs to display for that employee on the selected date then i want to display a label to inform the user that the employee is "Available" on that date.

 

I've been trying various isEmpty formulas on my Browse Gallery but can't seem to get the syntax correct.

 

 

Any help is greatly appreciated.

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
CarlosFigueira
Power Apps
Power Apps

You can use the CountRows function using the AllItems property of the gallery to determine the visibility of this label. If your gallery is called 'BrowseGallery1', you can set the Visible property of the label to:

CountRows(BrowseGallery1.AllItems) = 0

View solution in original post

3 REPLIES 3
CarlosFigueira
Power Apps
Power Apps

You can use the CountRows function using the AllItems property of the gallery to determine the visibility of this label. If your gallery is called 'BrowseGallery1', you can set the Visible property of the label to:

CountRows(BrowseGallery1.AllItems) = 0
Anonymous
Not applicable

So simple yet so effective, excellent solution Carlos.

 

Thank you.

mdevaney
Super User
Super User

 

Use this code in the Visible property of the gallery.  The IsEmpty function checks if the the gallery has any values and returns a true or false results.

 

IsEmpty(BrowseGallery1.AllItems)

 


If you would like a full tutorial on how to create a gallery that shows a message when empty I've provided a link below.

 


Link to article:

Show A Message If A Power Apps Gallery Is Empty - Matthew Devaney

 

powerapps-emptystate-11a-1-1024x615.jpg

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Power Apps Ideas

Changes to Ideas Coming

We are excited to announce a new way to share your ideas for Power Apps!

Top Solution Authors
Top Kudoed Authors
Users online (3,427)