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 / Display Text Label whe...
Power Apps
Answered

Display Text Label when Gallery count = 0

(0) ShareShare
ReportReport
Posted on by 104

I have a screen that has a Gallery on the left hand side and when each item is clicked on it brings up the corresponding SharePoint form (in edit mode) on the right hand side where there is one mandatory field that needs to be completed before being Saved/Submitted. Once this mandatory field is completed, the item disappears from the gallery view.

 

I have added a text label that says something along the lines of "There are currently no submissions" which is set to display when the Gallery All Items Count = 0 (I have also set the SharePoint form component to be hidden when Gallery All Items Count = 0). 

 

This all works fine, however only on the initial screen load. For example, if I have one item in the gallery which I then complete the SharePoint form for on the right hand side, the text label does not appear and the SharePoint form remains with a "No items found" message. 

 

However, if I either refresh the page, or navigate to a new screen and back on to this screen, it works as expected. I therefore need to find a way to check how many items there are in the gallery after each item has been saved/submitted, and if it is equal to 0 then hide the form and display the text label. 

 

Is there any way I can get this working as I need it to?

Categories:
  • Verified answer
    narayan225 Profile Picture
    2,547 Moderator on at

    @SamB2

    I think you need to refresh your gallery count everytime the items are removed. I suggest that when you save the item, set the variable to use the gallery count.

    SubmitForm(form1);Set(countVariablle,gallery.AllItemsCount);

    That is if you are using variable, if not simply use if condition on the visibility to following:

    If(gallery.AllItemsCount = 0, true,false)

    and vice versa on gallery and label.

     

    Cheers!

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

#2
WarrenBelz Profile Picture

WarrenBelz 188 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 120

Last 30 days Overall leaderboard