---
url: /process-functions/security-application-screentag.md
description: Returns a ScreenTag object from the application tags object.
---

# Screen Tag&#x20;

Returns a ScreenTag object from the application `tags` object.

## Screen Tag Object

### Methods

* ### `name()`

  Returns the tag name as a string.

* ### `type()`

  Returns `"screen"`.

* ### `users()`

  Returns an array of [User objects](/process-functions/userSecurity-user) assigned to this tag.

* ### `access()`

  Returns an object containing the screen access entries assigned to this tag.

* ### `addUser(userIdOrUserOrEmail)`

  Assigns a user to this tag and returns `true` if the user was added, otherwise `false`.

  * `userIdOrUserOrEmail` (number | string | object): The user id, email address, or [User object](/process-functions/userSecurity-user).

* ### `removeUser(userIdOrUserOrEmail)`

  Removes a user from this tag and returns `true` if the user was removed, otherwise `false`.

  * `userIdOrUserOrEmail` (number | string | object): The user id, email address, or [User object](/process-functions/userSecurity-user).

* ### `hasUser(userIdOrUserOrEmail)`

  Returns `true` if a user is assigned to this tag, otherwise `false`.

  * `userIdOrUserOrEmail` (number | string | object): The user id, email address, or [User object](/process-functions/userSecurity-user).

* ### `set(screenIdOrTitle, visible)`

  Sets visibility for a screen on this tag and returns `true` if the screen entry was set, otherwise `false`.

  * `screenIdOrTitle` (string): The screen id or title.
  * `visible` (boolean): Whether the screen is visible.

* ### `clear()`

  Removes all screen visibility entries from this tag.

* ### `json()`

  Returns the tag as an object.

* ### `json(includeAccessEntries)`

  Returns the tag as an object and optionally includes access entries.

  * `includeAccessEntries` (boolean): If `true`, includes access entries in the returned object.

### Examples

```js
var app = security.application("My Application");
var tag = app.tags.createScreen("Planner Screens");

tag.set("Planner", true);
tag.addUser("user@example.com");

console.log(tag.access());
console.log(tag.json(true));
```
