cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

Gallery - loading progress bar and auto refresh (CDS connector & Dynamics 365)

Is it possible to display a loading/progress bar on a gallery while records for that gallery are being created via PowerAutomate and then have it automatically disappear and auto-refresh when the records are created? 

 

Please note, I am using the CDS connector working with Dynamics 365 entities

 

Scenario example:

  1. On Screen 1 - the user creates 'Record A' and on submission the navigation moves the user to Screen 2
  2. The creation of 'Record A' has triggered a PowerAutomate (Flow) to create child records 'Record B 1, 2,...,n'
  3. On Screen 2, there is an EditForm which displays fields from 'Record A' and a Gallery to display all the child 'Record B's'
  4. Because the child records in the gallery are being created in the background and aren't created instantly, I would like to show a progress bar or loading spinner that remains there until the child records have been created.
  5. Once the child records have been created, the gallery auto-refreshes and displays the items rather than the progress bar/loading spinner. Is this possible?

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: Gallery - loading progress bar and auto refresh (CDS connector & Dynamics 365)

Hi @binkster ,

 

Please check steps: 

1. In the App, first to add a loading GIF into Media, then add the Gif above the Gallery, set its Visible property to 'VarVisible' 

Snipaste_2020-01-03_17-44-14.png

2. Set the following code to Onselect property of button.

 

Set(VarVisible,true);Flow.Run();Refresh('SP list');Set(VarVisible,false)

 

3. Set DisplayMode of Gallery: 

 

If(VarVisible,Disabled,DisplayMode.Edit) 

 

 StoG_17.gif

 

Sik

View solution in original post

2 REPLIES 2
Highlighted
Community Support
Community Support

Re: Gallery - loading progress bar and auto refresh (CDS connector & Dynamics 365)

Hi @binkster ,

 

Please check steps: 

1. In the App, first to add a loading GIF into Media, then add the Gif above the Gallery, set its Visible property to 'VarVisible' 

Snipaste_2020-01-03_17-44-14.png

2. Set the following code to Onselect property of button.

 

Set(VarVisible,true);Flow.Run();Refresh('SP list');Set(VarVisible,false)

 

3. Set DisplayMode of Gallery: 

 

If(VarVisible,Disabled,DisplayMode.Edit) 

 

 StoG_17.gif

 

Sik

View solution in original post

Highlighted
Solution Supplier
Solution Supplier

Re: Gallery - loading progress bar and auto refresh (CDS connector & Dynamics 365)

I think that you should reconsider your approach in order to solve this situation, like this:

 

Re-create the PowerAutomate flow with a trigger from PowerApps (and send the Record1 data as parameter via JSON). Please see this topic to understand how.

     https://powerusers.microsoft.com/t5/Building-Power-Apps/Passing-the-PowerApps-Collection-to-MS-Flow/...

 

Inside this flow you can write to CDS - Record A, and also its child records 'Record B 1, 2,...,n'.

 

At the end, respond from PowerAutomate to PowerApps with one parameter that confirm that the flow is finished.

 

The flow should be triggered from PowerApps app with a code like this Set(flowFinished,flowToUpdateData.RUN(RecordA))

 

In Screen 2 you will need a Timer with OnTimerEnd property set to check the value of flowFinished and a full-screen label with its Visible property set up with the result of previous timer check and Text property something like "Loading ...".

 

Hope it help my idea !

Helpful resources

Announcements
Ignite

Microsoft Ignite

This will be a conference that you do not want to miss!

secondImage

New Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

August 2020 CYST Challenge

Check out the winners of the recent 'Can You Solve These?' community challenge!

Experience what’s next for Power Apps

Join us for an in-depth look at the new Power Apps features and capabilities at the free Microsoft Business Applications Launch Event.

Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response 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 (4,934)