cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
estebinmusic
Regular Visitor

Navigate to different pages depending on the user and an IDType


Good afternoon everyone, a thousand apologies. I am faced with English and powerapps, so I use the translator for this application ...

I have a list of users of my company in sharepoint. I tried to make a start that allows me, depending on the profile of the user, to go to a different screen ... but I could not ... this is my table and the formula I use ...

Exactly what I need is for you to first validate that the user who enters (office365) is in the list of shared points and then, depending on the ID profile, navigate to a different page.

The formula I use is the following ... I appreciate that someone can help me ...

If (LookUp (TB_USTHumanDPI; UsersofOffice365.MyProfile (). UserPrincipalName in Title); Navigate ([@ ValidHome]; ScreenTransition.Fade)

 

2 ACCEPTED SOLUTIONS

Accepted Solutions
Anonymous
Not applicable

Have this on your OnStart Property of the app.

 

//set employee metadata up
Set(UserProfileUPN,Office365Users.MyProfile().UserPrincipalName)

 

Now use the variable in your look up to confirm that the user is in the sharepoint list.

If true navigate to the appropriatre screen.

 

If(LookUp(TB_USTHumanDPI, Title = UserProfileUPN).Title = UserProfileUPN, Navigate(ValidHome, ScreenTransition.Fade), Navigate(Other Screen Name, ScreenTransition.Fade))

 

Hope this helps

 

View solution in original post


I solved it ...

I post for anyone who has this need ...

 

What I implemented was to declare in the OnStart event of the APP the global variables that I need ...

 

//set employee metadata up
Set(UserProfileUPN;UsuariosdeOffice365.MyProfile().UserPrincipalName);;
Set(UserProfileAdministrador;1);;
Set(UserProfileDirectorR;2);;
Set(UserProfileDirectorS;3);;
Set(UserProfileCoordinadorR;4);;
Set(UserProfileCoordinadorS;5);;
Set(UserProfileEnlaceT;6);;
Set(UserProfileGestorT;7)

 

Then formulate in the OnSelect event button for each profile and navigation

 

If((LookUp(TB_USTHumanDPI;Title = UserProfileUPN).IdPerfilDPI = UserProfileAdministrador);Navigate([@IniAdmon];ScreenTransition.Fade);If((LookUp(TB_USTHumanDPI;Title = UserProfileUPN).IdPerfilDPI = UserProfileEnlaceT);Navigate([@IniGestion];ScreenTransition.Fade);Navigate([@IniNoIden];ScreenTransition.Fade)))

 

A thousand thanks to: @Anonymous ... All my gratitude is for you

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Have this on your OnStart Property of the app.

 

//set employee metadata up
Set(UserProfileUPN,Office365Users.MyProfile().UserPrincipalName)

 

Now use the variable in your look up to confirm that the user is in the sharepoint list.

If true navigate to the appropriatre screen.

 

If(LookUp(TB_USTHumanDPI, Title = UserProfileUPN).Title = UserProfileUPN, Navigate(ValidHome, ScreenTransition.Fade), Navigate(Other Screen Name, ScreenTransition.Fade))

 

Hope this helps

 

View solution in original post

Thanks you very much ... this works !!! I would like to include a new variable ... but it does not work ...

 

If (LookUp (TB_USTHumanDPI; Título = UserProfileUPN) .Title = UserProfileUPN And If (LookUp (TB_USTHumanDPI; IdPerfilDPI = "1") .IdPerfilDPI = "1"; Navigate ([@ ValidInicio]; ScreenTransition.Fade); Screen1]; ScreenTransition.Fade))


I solved it ...

I post for anyone who has this need ...

 

What I implemented was to declare in the OnStart event of the APP the global variables that I need ...

 

//set employee metadata up
Set(UserProfileUPN;UsuariosdeOffice365.MyProfile().UserPrincipalName);;
Set(UserProfileAdministrador;1);;
Set(UserProfileDirectorR;2);;
Set(UserProfileDirectorS;3);;
Set(UserProfileCoordinadorR;4);;
Set(UserProfileCoordinadorS;5);;
Set(UserProfileEnlaceT;6);;
Set(UserProfileGestorT;7)

 

Then formulate in the OnSelect event button for each profile and navigation

 

If((LookUp(TB_USTHumanDPI;Title = UserProfileUPN).IdPerfilDPI = UserProfileAdministrador);Navigate([@IniAdmon];ScreenTransition.Fade);If((LookUp(TB_USTHumanDPI;Title = UserProfileUPN).IdPerfilDPI = UserProfileEnlaceT);Navigate([@IniGestion];ScreenTransition.Fade);Navigate([@IniNoIden];ScreenTransition.Fade)))

 

A thousand thanks to: @Anonymous ... All my gratitude is for you

View solution in original post

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Top Solution Authors
Top Kudoed Authors
Users online (11,206)