cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Advocate I
Advocate I

Checking a Collection has populated

Hi folks,

 

Apologies if this is a bit of a basic question but I'm trying to create a loading screen for users whilst a Collection populates from the CDS. Is there any way of checking when a Collect has finished populating? I can't see any documentation on return values or callbacks, etc. 

 

Thank you in advance,

 

Matt

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User III
Super User III

Re: Checking a Collection has populated

@MattTaylor 

 

You betcha there is a way!  And lucky for you it is pretty straightforward. 

 

My method of creating a preloader (that's what I call a loading screen) is to put it on the same screen the User is waitng for.  I make a rectangle shape that covers the whole screen and shows a loading animation.  When the data is loaded I trigger the preloader to hide using the Visible property of my rectangle shape and animation.

 

If you want to show a preloader while the collection is unpopulated and hide the preloader when the collection becomes populated put the following code in the Visible property of every component in your preloader.

 

IsEmpty(your_collection_name)

 

Let me know if that works for you.

 

---
Please click "Accept as Solution" if my response helped to solve your issue so that others may find it more quickly. If your thought the post was helpful please give it a "Thumbs Up."

View solution in original post

2 REPLIES 2
Highlighted
Super User III
Super User III

Re: Checking a Collection has populated

@MattTaylor 

 

You betcha there is a way!  And lucky for you it is pretty straightforward. 

 

My method of creating a preloader (that's what I call a loading screen) is to put it on the same screen the User is waitng for.  I make a rectangle shape that covers the whole screen and shows a loading animation.  When the data is loaded I trigger the preloader to hide using the Visible property of my rectangle shape and animation.

 

If you want to show a preloader while the collection is unpopulated and hide the preloader when the collection becomes populated put the following code in the Visible property of every component in your preloader.

 

IsEmpty(your_collection_name)

 

Let me know if that works for you.

 

---
Please click "Accept as Solution" if my response helped to solve your issue so that others may find it more quickly. If your thought the post was helpful please give it a "Thumbs Up."

View solution in original post

Highlighted
Advocate I
Advocate I

Re: Checking a Collection has populated

Sorry for the delay, it works like a charm - thank you kindly!

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Find your favorite faces from the community presenting at the Power Platform Community Conference!

Watch Now

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (5,209)