cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
GreenJaguar
Helper I
Helper I

using different startscreens based on condition

I have an app that should only be used by users who have signed an agreement.  

The agreement acceptance is saved in a SharePoint list.

A new users should be directed to the agreement screen, but those who sign the agreement should be directed to the Home Screen.

 

I thought of using the lookup function on StartScreen to check the Created by.DisplayName by field against the Office365Users().displayName like this

LookUp(table,'Created By'.DisplayName <> Office365Users.MyProfileV2().displayName,scrn_Agreement), but no cigar.

 

Suggestions and help appreciated.

 

Alternatively, I could set up the value of a variable tied to the acceptance form to true, using OnStart, but that I can't quite set the expression correctly

1 ACCEPTED SOLUTION

Accepted Solutions
RandyHayes
Super User
Super User

@GreenJaguar 

Utilize the StartScreen property of your app and set the formula in there to:

If(LookUp(table, 'Created By'.DisplayName = User().FullName, true),
   scrn_Home,
   scrn_Agreement
)

 

If you have the potential to have a lot of people in your organization and perhaps two might have the same name, then I would base the above on the email instead of the DisplayName.

 

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

View solution in original post

2 REPLIES 2
phipps0218
Super User
Super User

If(IsEmpty(Filter(TableName, Logic)), Navigate to Agreement Screen, Navigate to Home Screen)

 

Please Accept as Solution if it solves your question. Or just give it a Thumbs Up if it is helpful because this can help others.

LinkedIn: https://www.linkedin.com/in/charlie-phipps-%F0%9F%91%A8%E2%80%8D%F0%9F%92%BB-91338715b/
YouTube: https://www.youtube.com/channel/UChmFBGU1YKIU91sNMQ7buGg
Twitter: https://twitter.com/phipps0218

RandyHayes
Super User
Super User

@GreenJaguar 

Utilize the StartScreen property of your app and set the formula in there to:

If(LookUp(table, 'Created By'.DisplayName = User().FullName, true),
   scrn_Home,
   scrn_Agreement
)

 

If you have the potential to have a lot of people in your organization and perhaps two might have the same name, then I would base the above on the email instead of the DisplayName.

 

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Top Solution Authors
Top Kudoed Authors
Users online (1,170)