Hello Everyone,
First, I would like to personally thank everyone for providing such a great response to PowerGuide Program and keep your spirits up during this tough Covid time!
I wish you well during this challenging time. Stay at home. Be healthy and God bless you!
Keep Learning and Don't Let Your Learning Lockdown...
I am Starting today's Power Guide Mentorship Program with a Positive Thought:
TOUGH TIMES DON'T LAST
TOUGH PEOPLE DO
So in today's program, I am going to share a tip to design a loading Icon or displaying a loading message until your Canvas App Loads the Controls and Data on the screen.
Of Course, it will improve your app's user experience as well.
In PowerApps, we have two techniques to provide this feature:
Technique 1 - Out Of Box Loader
Out Of Box Canvas App, provide a property called LoadingSpinner and LoadingSpinnerColor.
LoadingSpinner property is used to displaying a Canvas App OOB Loader Image unless your screen finishes loading.
LoadingSpinner can be used in three ways:
- LoadingSpinner.None- Setting it's a value to None means it won't show the Loading Image on the screen.
- LoadingSpinner.Controls - Setting it's value to Controls means, it will show the Loading Spinner unless all the controls present on the screen gets loaded completely
- LoadingSpinner.Data - Setting it's value to Data means, it will show the Loading Spinner unless all the data gets retrieved on the screen from the defined data source
LoadingSpinnerColor property is used to change the color of the loading image (as per your need).
Please see below, how can you find these two properties in Canvas App Screen:
Click on the Screen in your Canvas App and then You'll be able to see LoadingSpinner and LoadingSpinnerColor Property |
By default, LoadingSpinner value is set to None, but you can change it either Data or Controls as per your need |
Different ways to display the LoadingSpinner |
Can change LoadingSpinner Color using LoadingSpinnerColor property |
This is how OOB Loading Spinner Looks like |
Technique 2 - Design Custom Loader
I always promote using OOB features as much as possible whether it is Microsoft Dynamics 365 or Power Platform, however, while using this feature, my experience was not satisfactory to be very honest. Maybe Microsft will come up with some new enhancements to make it more mature.
And it's not me only who is complaining about this feature, you can find a lot of people (see reference below) having trouble using it especially in case of data loading.
https://powerusers.microsoft.com/t5/Building-Power-Apps/Custom-Loading-Spinner/td-p/268416
https://powerusers.microsoft.com/t5/Building-Power-Apps/Screen-new-property-LoadingSpinner/m-p/110767
Also, you can't change the Spinner Loader Image and its other properties (except its color).
Hence, to get rid of this situation, making your own loader is the best way, so that you can handle its appearance and Hide/Show as per your need.
Let's get started...
Step 1: Download the Gif Loader from the Internet (whatever you like)
Can refer following articles for the same:
Step 2: Add some Controls in your Canvas Screen where you want to display the loader
a) Rectangle Icon - To cover the whole screen and provide a placeholder for a loader.
b) Label - Display Progress Message (For Ex: "Please wait, Thanks for your patience...")
c) Image - To display Gif Loader Image.
Note: You can also design the loader screen as per your need by adding more controls.
Step 3: Declare a Variable to manage Hide/Show of Loader and all the Controls created in Step 2.
Set the Variable to all the Controls (on Visible Property)
In the screenshot below, I have set the Variable for Label Control only. However, you have to do the same for the Rectangle and Loading Image as well.
Note: After setting a Variable (DisplayLoader) name, you'll get an error on the controls. Please ignore it for the time being. It is because we didn't set its value yet anywhere on the screen.
Step 4: Set the Variable value to True when you want to display the Loader, else set the value to False when you want to Hide the Loader (can hide/show as per your need)
In the below example, I am creating a Lead in Dynamics 365. and I have used the following formula on Create Button Control (OnSelect Property).
I have Set the Variable value to True (to display loader) at the beginning of my code and Set the Variable value to False (to hide the loader) at the end of the code
// Display Loader
Set(DisplayLoader, true);
//patch the daa into D365
Patch(Leads, Defaults(Leads), { firstname: firstName_6.Text },{ lastname: lastName_5.Text },{emailaddress1: emailAddress_5.Text},{jobtitle: jobTitle_4.Text},{mobilephone: mobilephone_5.Text});
// Save Data Locally by adding above collection in Local Cache
Navigate(SuccessScreen,ScreenTransition.Fade);
//Once done with the operation. Hide the Loader
Set(DisplayLoader, false);
Step 6: Run and Test the App
So thumb rule of displaying this loader is:
Set the Variable Value to True at the beginning of your code
Set(DisplayLoader, true);
/////Logic 1
/////Logic 2
/////Run Power Automate 1
/////Run Power Automate 2
/////Run Power Automate 3
/////Run Power Automate.....n
/////Logic ...n
//Perform all the logic/create/update/delete/retrieve
Set(DisplayLoader, false);
Set the Variable value to False at the end of your code
Important Note: In the above example, I have used the loader while pushing the data/record in the database. However, If you want to display the loader on the load of the screen, you can use the same algorithm (as shown above) on OnVisible property of your Canvas App Screen.
That's all folks for today.
Stay Tuned for my Next Tip - PowerGuideTip8.
I just never seen such this kinds of too informative, impressive and useful post in my life before. Thanks a lot for this fabulous post. Such a great job.Refer this link for power apps portal
ReplyDeletehttps://www.crmjetty.com/blog/how-to-dynamics365-powerapps-portal/
microsoft dynamics customer portal
Hey what a brilliant post I have come across and believe me I have been searching out for this similar kind of post for past a week and hardly came across this. Thank you very much and will look for more postings from you. bottle screen printing machine
ReplyDeleteGreat article like this require readers to think as they read. I took my time when going through the points made in this article. I agree with much this information
ReplyDeleteDevOps Training in Chennai | DevOps Training in anna nagar | DevOps Training in omr | DevOps Training in porur | DevOps Training in tambaram | DevOps Training in velachery
This blog is very much helpful to us. Thanks for your information
ReplyDeleteThe information which you have provided in this blog is really useful to everyone
PHP Training in Chennai | Certification | Online Training Course | Machine Learning Training in Chennai | Certification | Online Training Course | iOT Training in Chennai | Certification | Online Training Course | Blockchain Training in Chennai | Certification | Online Training Course | Open Stack Training in Chennai |
Certification | Online Training Course
Easily, the article is actually the best topic on this registry related issue. I fit in with your conclusions and will eagerly look forward to your next updates. t-shirt prints
ReplyDeleteby the way, you can change the GIF file to a cooler one
ReplyDeletehttp://icons8.com/preloaders
by the way, you can change the GIF file to a cooler one
ReplyDeletehttp://icons8.com/preloaders
Thanks a lot very much for the high quality and results-oriented help. I won’t think twice to endorse your blog post to anybody who wants and needs support in this area. same as your blog i found another one Web Analytics .Actually I was looking for the same information on internet for Web Analytics and came across your blog. I am impressed by the information that you have on this blog. Thanks once more for all the details.
ReplyDeleteMunroe island lake resort in Kollam is a Budget-friendly resort, we offer great service to our customers & We are the best island resorts in Kerala which is especially located in line with the famous Ashtamudi Lake and the Kallada River.
ReplyDeleteIt was reaaly wonderful reading your article. # BOOST Your GOOGLE RANKING.It’s Your Time To Be On #1st Page
ReplyDeleteOur Motive is not just to create links but to get them indexed as will
Increase Domain Authority (DA).We’re on a mission to increase DA PA of your domain
High Quality Backlink Building Service
1000 Backlink at cheapest
50 High Quality Backlinks for just 50 INR
2000 Backlink at cheapest
5000 Backlink at cheapest
Cliff Saunders has spent over 20 years as a student of health and wellnessdisha patani xxx keerthi suresh sex bollywood nude anushka sharma xxx anushka sen xxx kajal nude bollywood actress nude rashi khanna nude tamanna sex videos miya khalifa sex
ReplyDelete