
Announcements
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