cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
JimmyWork
Super User
Super User

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
Super User
Super User

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
Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Super User 2 - 2022 Congratulations

Welcome Super Users

The Super User program for 2022 - Season 2 has kicked off!

September Events 2022

Check out all of these events

Attend in person or online, there are incredible conferences and events happening all throughout the month of September.

Government Carousel

New forum: GCC, GCCH, DoD - Federal App Makers (FAM)

In response to the unique and evolving requirements of the United States public sector, Microsoft has created Power Apps US Government.

Users online (2,269)