cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
JimmyWork
Memorable Member
Memorable Member

App.StartScreen does not work with OnVisible on the screen it takes the user to

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.

1 ACCEPTED SOLUTION

Accepted Solutions
StalinPonnusamy
Super User
Super User

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.

 

 

 

 

View solution in original post

3 REPLIES 3
JimmyWork
Memorable Member
Memorable Member

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

StalinPonnusamy
Super User
Super User

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

Helpful resources

Announcements
PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

Top Solution Authors
Top Kudoed Authors
Users online (3,286)