cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Kumar9024021
Level: Powered On

App.OnStart Navigate screen not working properly

I have a powerapp screens where based on different roles, I am redirecting the users to different screen. Hence, I have written below piece of code in App.OnStart()

 

  1. ClearCollect(O365SubmitterGroup_Col,Office365Groups.ListGroupMembers("SubmitterGroupID").value);
  2. Set(IsSubmitter,If(!IsBlank(LookUp(O365SubmitterGroup_Col,displayName=User().FullName)),true,false));
  3. ClearCollect(O365ApproverGroup_Col,Office365Groups.ListGroupMembers("AppGroupID").value);
  4. Set(IsApprover,If(!IsBlank(LookUp(O365ApproverGroup_Col,displayName=User().FullName)),true,false));
  5. If(IsApprover,Navigate('ApproverScreen',Fade),Navigate('SubmitterLaunchScreen',Fade));

 

I added a user in Office365Approver Group and on launch, it correctly iterated to the Approver request screen.

I removed the user from the Office365Approver Group and added the same user in Office365SubmitterGroup and tested the powerapp. It still redirects to the approver screen, instead of Submitter screen.

 

Deleted browsing history, cache, open and closed the browser, republished the powerapp, still it behaves same. Any technical advice would be helpful.

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: App.OnStart Navigate screen not working properly

Hi @Kumar9024021 ,

Have you taken a try to re-load your app after you remove the user from the Office365Approver group and add the same user to the Office365Submitter Group?

 

I have made a test on my side, please consider take a try with the following workaround:

Set the OnStart property of App to following:

If(
   User().FullName in Office365Groups.ListGroupMembers("SubmitterGroupID").value.displayName,
   Navigate(SubmitterLaunchScreen),
   User().FullName in Office365Groups.ListGroupMembers("AppGroupID").value.displayName,
   Navigate(ApproverScreen)
)

Please consider take a try with above solution, then check if the issue is solved.

Note: If you remove the user from a Office 365 Group, or add a user into a Office 365 Group, please consider re-load your app to make the changes take effect in your app.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
Community Support Team
Community Support Team

Re: App.OnStart Navigate screen not working properly

Hi @Kumar9024021 ,

Have you taken a try to re-load your app after you remove the user from the Office365Approver group and add the same user to the Office365Submitter Group?

 

I have made a test on my side, please consider take a try with the following workaround:

Set the OnStart property of App to following:

If(
   User().FullName in Office365Groups.ListGroupMembers("SubmitterGroupID").value.displayName,
   Navigate(SubmitterLaunchScreen),
   User().FullName in Office365Groups.ListGroupMembers("AppGroupID").value.displayName,
   Navigate(ApproverScreen)
)

Please consider take a try with above solution, then check if the issue is solved.

Note: If you remove the user from a Office 365 Group, or add a user into a Office 365 Group, please consider re-load your app to make the changes take effect in your app.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Highlighted
Kumar9024021
Level: Powered On

Re: App.OnStart Navigate screen not working properly

Thanks @v-xida-msft 

Helpful resources

Announcements
thirdimage

Power Apps Super User Class of 2020

Check it out!

thirdimage

New Badges

Check it out!

thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors
Users online (4,744)