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 / Right Place to call th...
Power Apps
Answered

Right Place to call the collections of the App

(0) ShareShare
ReportReport
Posted on by 2

I am working on Teams power app.

 

I have a first screen (consider as a home screen of the app) when the app opens

It has a gallery which gets data loaded by a collection currently having 5200 records, which takes around 20 seconds time to upload all the data. Till here All is working fine.

 

The annoying is that when user navigate on another screen and come back to this screen, he has wait again as the collection is getting loaded.

 

I suspect that I am calling the collection at wrong place. If I would have called the collection at startup or at a place where it remains the collection loaded, then user don't need to wait again during the revisit to the screen.

 

Please guide which the right place to let the collection happens which can be used globally till the app is closed.

 

 

 

Categories:
I have the same question (0)
  • Verified answer
    WarrenBelz Profile Picture
    153,781 Most Valuable Professional on at

    @MIA27 ,

    Where do you have the collection load code ? If it is on OnVisible of the screen, then test that the collection is already filled

    If(
     CountRows(YourCollectionName) = 0,
     ClearCollect(
     YourCollectionName,
     . . . . . 
     )
    )

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    MVP (Business Applications)   Visit my blog Practical Power Apps

     

  • MIA27 Profile Picture
    2 on at

    sorry,  I am trying to apply the code which was on the visible property of the screen,

    It is not showing that Collection to select.

     

    Below is the image, please check and guide

     

    MIA27_0-1710575934026.png

     

  • Verified answer
    WarrenBelz Profile Picture
    153,781 Most Valuable Professional on at

    @MIA27 ,

    Just type it in - it will validate once you finish. That collection code looks familiar . . .

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
Haque Profile Picture

Haque 70

#2
WarrenBelz Profile Picture

WarrenBelz 64 Most Valuable Professional

#3
Kalathiya Profile Picture

Kalathiya 36 Super User 2026 Season 1

Last 30 days Overall leaderboard