web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / OnStart code efficienc...
Power Apps
Unanswered

OnStart code efficiency review

(0) ShareShare
ReportReport
Posted on by 364

Morning all,

 

I was hoping to check if this is the best way I could be running this OnStart code to speed up the load of my app:

 

 

//Icon table for SVG icons
Set(Icons, IconTable);

Concurrent(

//Variables to be reset
Set(suggested, Blank()),
Set(glossarySortOrder, Blank()),
Set(areaCat, Blank()),
Set(selectedItem, false),
Set(glossary, false),
Set(infoPane, false),

//SVG Icons
Set(pbiIcon, LookUp(Icons, "pbiIcon" in IconName, IconLink)),
Set(updateIcon, LookUp(Icons, "updateIcon" in IconName, IconLink)),
Set(mailIcon, LookUp(Icons, "mailIcon" in IconName, IconLink)),
Set(pageIcon, LookUp(Icons, "pageIcon" in IconName, IconLink)),
Set(staffIcon, LookUp(Icons, "staffIcon" in IconName, IconLink)),
Set(saveIcon, LookUp(Icons, "saveIcon" in IconName, IconLink)),
Set(homeIcon, LookUp(Icons, "homeIcon" in IconName, IconLink)),
Set(downIcon, LookUp(Icons, "downIcon" in IconName, IconLink)),

//Colour palette
Set(skyBlue, ColorValue("#0079BB")),
Set(lightBlue1, ColorValue("#CCE7F6")),
Set(bgBlue, RGBA(241,244, 249, 0.8)),
Set(itemGrey, ColorValue("#D6DFEE")),
Set(bgGrey, RGBA(167, 182, 203, 0.56)),
Set(headerBlue, RGBA(0, 121, 187, 0.81)),

//Alphabet table for Glossary
Set(alph, AlphTable),

//Area Filter table
ClearCollect(
 areaFilters, 
 {Area: "Home"},
 {Area: "Staff"}, 
 {Area: "Students"}, 
 {Area: "Report"}, 
 {Area: "Page"},
 {Area: "Add Item"}),

//FAQ Dataset
ClearCollect(
 faqCol,
 Filter(
 'FAQ Dataset',
 Status.Value = "Active")),

//Items updating soonest
Set(
 calendarCol,
 FirstN(
 AddColumns(
 Filter(
 GroupBy(
 SortByColumns(
 Filter(
 AddColumns(
 Calendar,
 "_FAQname", 'FAQ Item Name'.Value
 ), Month >= Today()),
 "Month", Ascending
 ),
 "_FAQname",
 "FAQs"
 ),
 !IsBlank(_FAQname)
 ),
 "MostRecent", First(FAQs).Month,
 "Details", First(FAQs).Name1
),
3
)));

//Attachments Collection
ClearCollect(preImageCol, 0);
ClearCollect(
 imageCol,
 Filter(
 Ungroup(
 ForAll(
 Sequence(
 CountRows(faqCol)),
 Collect(
 Test,
 Last(Test).Value+1);
 {
 Image:Last(FirstN('FAQ Dataset',Last(Test).Value)).Attachments,
 ID:Last(FirstN('FAQ Dataset',Value)).ID
 }),
 "Image"),
 !IsBlank(Id)))

 

 

For info, the Alph and Icon collections are drawn from Excel tables uploaded as static tables to reduce the load on the App and to remove ghastl

 

Categories:
I have the same question (0)

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 525 Most Valuable Professional

#2
Haque Profile Picture

Haque 273

#3
Kalathiya Profile Picture

Kalathiya 232 Super User 2026 Season 1

Last 30 days Overall leaderboard