Hello,
I have piece of code that creates collection from filtered database and counts the rows to create count and percentage of employees working for each day of the week.
ClearCollect(CL_Percentages, Filter(Database_List, Week=ddWeekNo_Admin.SelectedText.Value, If(ddDepartment.SelectedText.Value = "All", true, Department.Value = ddDepartment.SelectedText.Value)));
Set(Total, CountRows(CL_Percentages));
Set(MonCount, CountRows(Filter(CL_Percentages, Monday.Value="Working")));
Set(MonProc,Round(MonCount/Total*100,1));
The code continues for all days of the week. I have this code in three places:
- "ddWeekNo_Admin" dropdown in OnChange;
- "ddDepartment" dropdown in OnChange;
- "Admin_Menu", the screen where it all takes place in OnVisible
If you change one of the dropdowns the code executes without an issue, everything is calculated. However the Admin_Menu part, where the code was supposed to be ran for the first time just refuses to work. I even tried applying this code to other controls such as on App OnLaunch, the button leading to that screen and a timer with 1s delay after showing that screen.
This issue appears when using the app on phone. Other users also reported it happening on their PCs.