Skip to main content

Notifications

Power Up Program - Build A Canvas App
Unanswered

Is anyone facing issue with getting Gallery AllItemsCount

Like (1) ShareShare
ReportReport
Posted on 14 Jan 2025 18:55:35 by
I am using AllItemsCount in the visibility property of a text control to display messages like "No control found." Similarly, I am using the formula:

Sum(  
    Self.AllItems,  
    lblHeight.Text  
)  

However, both of these approaches have been inconsistent—sometimes they work, and other times they do not. To resolve this issue, I had to replace these with CountIf(Datasource, true) > 0 in the visibility property for every instance where a gallery is used to ensure consistent functionality. Anyone else facing this issue?
Categories:
  • Suggested answer
    timl Profile Picture
    timl 32,896 on 14 Jan 2025 at 21:33:17
    Is anyone facing issue with getting Gallery AllItemsCount
    The approach that you're using now is the best way.
     
    AllItemsCount returns the items that are visible in the gallery and the value will depend on the load state. The value typically increases as a user scrolls the gallery as records are loaded in batches.
     
    A variation of the formula that you're using would be this (which avoids needing to pass true to the CountIf function):
    CountRows(Datasource) > 0
     

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

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 144,638

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,433

Leaderboard

Featured topics

Loading started