Hello
From a performance perspective, is it better to have my ClearCollect code running in the OnStart of my App or OnVisible of the screen or when navigating back from the Success screen?
I have a screen (scrEmployees) with one gallery which displays more than 2000 items from a SharePoint list. I can also update an item in this gallery. Is it better to have ClearCollect in the OnVisible of the screen such that after editing it will refresh the collection or should I call ClearCollect in the success screen before navigating back to the previous screen scrEmployees?
Also, is there a better way to write the code below? I'm only doing this because the delegation limit is set to 500. I don't want to increase it to 2000.
Concurrent(
ClearCollect(
EmpNew, Filter(Employees, 'Employee Status'.Value="New")
),
ClearCollect(
EmpInProgress, Filter(Employees, 'Employee Status'.Value="In Progress")
),
ClearCollect(
EmpCompleted, Filter(Employees, 'Employee Status'.Value="Completed")
),
ClearCollect(
EmpPending, Filter(Employees, 'Employee Status'.Value="Pending")
),
ClearCollect(
EmpClosed, Filter(Employees, 'Employee Status'.Value="Closed")
)
);
ClearCollect(
EmployeesCollection,
EmpNew,
EmpInProgress,
EmpCompleted,
EmpInvoicePending,
EmpClosed
)
I'm keen to know how best to manage this ClearCollect call without slowing down performance as I have approximately half a dozen people using the app at any given time and several screens like the one above in the future.
Thanks
Yoshi