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

Screen Navigation Based on User( ).Email

I need to Create a navigation from one screen to another based on User ( ).Email.

Example : If the User( ).Email = examplemail@mail.com navigate to screen2, else navigate to screen3 on a button Click

2 REPLIES 2
Anonymous
Not applicable

Re: Screen Navigation Based on User( ).Email

How many users are you talking about?

mr-dang
Level 10

Re: Screen Navigation Based on User( ).Email

@Anonymous is asking the right question--this is going to be a big task.

 

I am an advocate of the Table() function. It allows you to build a table inside of a formula. And it lets you store references to controls and screens, which a traditional table cannot.

 

The table below has two columns: user and screen. Each user corresponds to a different screen.

Table(
    {user: user1@email.com, screen: Screen1},
    {user: user2@email.com, screen: Screen2},
    {user: user3@email.com, screen: Screen3}
)

Either collect the table to a collection (formula below) or bind the formula above to a gallery's Items property.

Collect(collection_name,
    Table(
        {user: user1@email.com, screen: Screen1},
        {user: user2@email.com, screen: Screen2},
        {user: user3@email.com, screen: Screen3}
    )
)

Wherever you put your navigation formula, perform a lookup to your table. 

 

If you stored the table in a collection:

Navigate(LookUp(collection_name,user=User().Email,screen),Fade)

If you stored the table directly in a gallery:

Navigate(LookUp(Gallery1.AllItems,user=User().Email,screen),Fade)

This means, "Navigate to the screen that results when you look up the email of the current user. Use a fade transition."

 

Let me know if this helps.

 

Mr. Dang

 

____

Microsoft Employee
@8bitclassroom