In some applications, you may want to show or hide screens based on who is logged in. This is where the Screen Visibility Logic comes in. Let's take the example of a Task management app. Suppose we want to show a screen to create a New Task only for managers but hide it for other employees.
Before using the screen visibility, please ensure your app is private by selecting a users' database. Learn how to do it here.
Go to the screen you want to hide. You will see a section named, Screen Visibility Logic. Click on the + Add Logic button.
Further, select the Role column (this could be different for your app) from your Users' database.
Add a condition where the Role column's datais equal to Manager.
With this, when a user logs in to the app only if their Role property has the value Manager, they can see the New Task screen.
Screen visibility cannot be tested in the builder app preview. To test this, open the app link in a separate tab and login as a user.