cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
MattTaylor
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
mdevaney
Super User III
Super User III

@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
mdevaney
Super User III
Super User III

@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

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

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Power Apps June 2021

June Power Apps Community Call

Don't miss the call this month on June 16th - 8a PDT

Top Solution Authors
Top Kudoed Authors
Users online (12,188)