So with Navigate to, the solution works perfectly, if the users email was in a the group it would navigate them to one screen and if not to another.
Then on the landing screens I had set OnVisible to create a collection.
When updating this to the App.StartScreen the OnVisible on the landing screens have stopped working and no collections are being created.
Original Working solution
App.OnStart
Set(varUser, Lower(Office365Users.UserProfile(User().Email).Mail));
Set(varConcatAgents,Concat(Office365Groups.ListGroupMembers("GROUPID_HERE").value,mail));
If(varUser in varConcatAgents, Navigate(Screen_Dashboard_Agent,ScreenTransition.None) && Set(varAgent, true) && Set(varMenu, "Unassigned"), Set(varMenu, "Open"));
OnVisible on the Screen_Dashboard_User
If(
varMenu = "Open",
ClearCollect(
TicketsCollection,
Filter(
SharePointList,
(RequesterEmail = varUser)
)
)
)
New solution with App.StartScreen (Screen part works but OnVisible does not trigger, variables are set but no collection is being created.
App.OnStart
Set(varUser, Lower(Office365Users.UserProfile(User().Email).Mail));
Set(varConcatAgents,Concat(Office365Groups.ListGroupMembers("GROUPID_HERE").value,mail));
If(varUser in varConcatAgents, Set(varAgent, true) && Set(varMenu, "Unassigned"), Set(varMenu, "Open"));
App.StartScreen
If(User().Email in Concat(Office365Groups.ListGroupMembers("GROUPID_HERE").value,mail), Screen_Dashboard_Agent, Screen_Dashboard_User)
When using the App.StartScreen then OnVisible where I create a collection is not being triggered.
I have tried to copy paste the screen and see if a new screen works but issue stays the same.
Solved! Go to Solution.
Hi @JimmyWork
App OnStart and StartScreen work independently. It means both works asynchronously.
As you said, based on the condition screen redirected to the landing screen but App.OnStart might not be completed. So the varmenu variable is not assigned or empty.
If I create a timer and set it to AutoStart for example: If(varMenu = "Unassigned", true, false)
Then on timer end I just put create the collection, then it works, so variables are passed but collection is not working using OnVisible when using App.StartScreen
Hi @JimmyWork
App OnStart and StartScreen work independently. It means both works asynchronously.
As you said, based on the condition screen redirected to the landing screen but App.OnStart might not be completed. So the varmenu variable is not assigned or empty.
@StalinPonnusamy Thank you for responding you are correct, I disabled the "Use non-blocking OnStart rule" and everything started to work again. Thank you so much
This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.
Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.
User | Count |
---|---|
198 | |
72 | |
50 | |
41 | |
30 |
User | Count |
---|---|
253 | |
113 | |
95 | |
91 | |
76 |