# Screen Visibility

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.

{% hint style="info" %}
Before using the screen visibility, please ensure your app is private by selecting a users database. Learn how to do it [here](https://docs.notionapps.com/users/private-apps).&#x20;
{% endhint %}

1. Go to the screen you want to hide. You will see a section named, *Screen Visibility Logic.* Click on the *+ Add Logic* button.
2. Further, select the *Role* column (this could be different for your app) from your Users' database.

<figure><img src="https://4233028229-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5ZqDXcVVffWUqEIZVhmn%2Fuploads%2FKBXV3epJK47xAMfOzy0B%2Fscreen-vis-1.png?alt=media&#x26;token=34d57cd9-73af-4746-a407-735bad2e5cbd" alt=""><figcaption></figcaption></figure>

3. Add a condition where the *Role* column's data is equal to *Manager*.

<figure><img src="https://4233028229-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5ZqDXcVVffWUqEIZVhmn%2Fuploads%2F7T3LBdmrblTLQzW7R8t1%2Fscreen-vis-2.png?alt=media&#x26;token=d152d27b-39e6-489a-af54-606682fee378" alt=""><figcaption></figcaption></figure>

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.&#x20;

### View as a specific user

To test screen visibility in the app builder, you can click the "View as" button in the top bar and select a user.&#x20;

<figure><img src="https://4233028229-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5ZqDXcVVffWUqEIZVhmn%2Fuploads%2Fki6ZrW8qvoaYq4NXQpG2%2FScreenshot%202024-06-07%20at%209.25.37%E2%80%AFPM.png?alt=media&#x26;token=2f3155d5-6661-4cbe-b74b-d3719277e7ba" alt=""><figcaption></figcaption></figure>

*"Any user"* means no user has been selected.

<figure><img src="https://4233028229-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5ZqDXcVVffWUqEIZVhmn%2Fuploads%2FbGVFSywNrK5B9Im0zcZX%2FScreenshot%202024-06-07%20at%209.26.47%E2%80%AFPM.png?alt=media&#x26;token=0b420f78-b4a7-4f45-ba12-367f6bea8dc0" alt=""><figcaption></figcaption></figure>

If a screen is hidden for the currently selected user, you will see a message on top of the screen.&#x20;

<figure><img src="https://4233028229-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5ZqDXcVVffWUqEIZVhmn%2Fuploads%2FDZKg0yolZ4lCzJ1NEONz%2FScreenshot%202024-06-07%20at%209.34.12%E2%80%AFPM.png?alt=media&#x26;token=6f635569-ad66-4fd4-98c7-c026306e377f" alt=""><figcaption></figcaption></figure>
