@rajkumar88
If you think you will find yourself looking at the logic for if the user is a manager or not, you might want to consider using a global variable and then just work from that.
Set(_isManager,
!IsBlank(LookUp(EmailList, Lower(ManagerEmail) = Lower(userinfo)).ManagerEmail)
)
Then, whenever you need to determine if they are a manager or not, you can use that variable.
So, in your button controls, you can set the Visible property to : _IsManager if you only want to display the button if they are a manger.
And you can also change the main formula you have to the following:
Set(_isManager,
!IsBlank(LookUp(EmailList, Lower(ManagerEmail) = Lower(userinfo)).ManagerEmail)
);
If(_isManager,
Navigate(ManagerHomeScreen, ScreenTransition.None),
Navigate(EmpHomescreen, ScreenTransition.None)
)
The above should be what you can use.
BONUS:
Variables are overused though, so, you can also consider "keying" off of another control.
Many times we will want to "display" the fact that a person is a manager. So, perhaps there is an icon we put n the screen to display that fact. It's visible if they are, and not visible if they are not. Let's call that control, _icnManager
In the Visible property of _icnManager, we have the following Formula : !IsBlank(LookUp(EmailList, Lower(ManagerEmail) = Lower(userinfo)).ManagerEmail)
Now, for other places like a button we only want for a manager to see, we set the Visible property to : _icnManager.Visible
If the icon for the manager is visible, then so will be the button.
What I like about the above is that, if you ever change the "logic" of who is a manager, you pretty much know that you would look at the logic for the Manager Icon - very easy to recall. Plus, you have one less variable to deal with now.
When these formulas get put in OnStart's, Timer OnEnd's, OnVisible's etc. it's very hard to find where the "logic" is in case you want to change it.
Hope this is helpful for you.