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
Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on August 17, 2022 at 8am PDT.

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Users online (1,726)