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:
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.
That worked, thanks.
Apologies for not trying this and coming straight to conclusion.
Hi @Anonymous ,
Regardless of devices, the Apps always run in the PowerApps studio.
Does that above workaround make sense for your case?
Sik
I mean that the code doesn't execute specificaly outside the App Studio.
App Studio has no issues and code works perfectly. However if I run the app through my phone or MS Teams it fails.
Hi @Anonymous ,
Do you mean the codes can't be triggered properly in Screen.OnVisible property and App.OnStart property?
In this case, I prefer the issue is caused by Preview Features and Experimental Features Setting in App Studio.
Please try to toggle off all experimental feature and the following Preview features that may cause this issue.
Hope this helps.
Sik