Screen Access based on User Role

I’ve seen this topic posted quite a few times but all of the options are not working for my particular situation. Please help!

Database: I have a boolean “IsAdmin” role in the User database

Screens: I have two screens: one for users and one for Admin. New hires need only to access their information and Admin may need to access both admin dashboards and user screens.

Login screens: Using custom inputs and login buttons

Actions: Admin login button - I set the login actions on the login to “Sometimes” only when the logged in User - “IsAdmin” is true

Issue: I can still log in as an Admin and a user into the Admin Dashboard

Tried solutions #1: The interim page between user and admin dashboard screen - with this solution, I can’t access the user page with Admin login because it logs the Admin into the dashboard only

Tried solutions #2: Admin login button - put an additional action on the button to link to Admin Dashboard screen to “Sometimes” when logged in user “IsAdmin” is true - cannot log in at all

Tried solutions #3: Deleted “isAdmin” and create a “UserRole” database with a property of name with two options: User and Admin. Relationship - Many to Many (admins can have a user and admin role). Could not access this from the action menu, deleted it and went back to “isAdmin”.

The “sometimes” variable cannot detect a “logged in” user’s account settings (isAdmin) on a login action. In other words, upon tapping login, you would expect the action to log the user in > then perform the “sometimes” variable action, but it doesn’t… for whatever reason - I’m not sure if it’s a bug or if it was just never developed to do that.

So, when an admin or basic user logs in, they see everything on the other side of the login action because the sometimes variable was not triggered with the login action.

Though this may or may not work in your case, following the login action, direct users to a “loading/splash screen” and set the screen actions to redirect the appropriate screens based on whether the now-logged in user is an admin or not.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.