cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
MattTaylor
Helper II
Helper II

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

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Carousel April Dunnam Updated 768x460.jpg

Urdu Hindi D365 Bootcamp

Dont miss our very own April Dunnam’s The Developer Guide to the Galaxy! Find out what the Power Platform has to offer for the traditional developer.

Top Solution Authors
Top Kudoed Authors
Users online (2,555)