# Creating a Screen with Parts only available to Specific Users

Touch operation can be restricted by setting a security level for parts.

Touch operation for the parts will be enabled only when you log in with a level higher than the security level set for the parts.

## Example Operation

## Setting Workflow

1. Add Variables
2. Add User Groups
3. Add Users
4. Set up Parts
5. Set up Scripts

## Add Variables

### Project Explorer : [Variables] ➞ [All Variables]

Add the below variable(s).

#### Variables property:

[Name] | [Data Type]
Var1 | [BOOL]
Var2 | [BOOL]
Var3 | [BOOL]

## Add User Groups

### Project Explorer : [Security] ➞ [All Users]

Add the below user group(s).

#### UserGroup1 properties:

Tab | Property | Value
[Basic] | [Security Level] | 1

#### UserGroup2 properties:

Tab | Property | Value
[Basic] | [Security Level] | 5

## Add Users

### Project Explorer : [Security] ➞ [All Users] ➞ [UserGroup1]

Add the below user.

#### User properties:

[Name] | [Password]
Level1 | 1111

### Project Explorer : [Security] ➞ [All Users] ➞ [UserGroup2]

Add the below user.

#### User properties:

[Name] | [Password]
Level5 | 5555

## Set up Parts

### Project Explorer : [Screen Design] ➞ [Screens] ➞ [Screen1]

Drag and drop the following objects from the [Tool Chest] to the screen.

#### Lamp object (Name: Lamp1) properties: A-1

Tab | Sub Tab | Property | Value
[Function] | [Basic] | [Current Value] | [Variable] [Name]: Var1
[Touch] | [Operation] | [Type] | [Bit]
[Operation] | [Toggle]
[Destination] | [Variable] [Name]: Var1

#### Lamp object (Name: Lamp2) properties: A-2

Tab | Sub Tab | Property | Value
[Function] | [Basic] | [Current Value] | [Variable] [Name]: Var2
[Touch] | [Operation] | [Type] | [Bit]
[Operation] | [Toggle]
[Destination] | [Variable] [Name]: Var2
[Detail] | [Security] | 1

#### Lamp object (Name: Lamp3) properties: A-3

Tab | Sub Tab | Property | Value
[Function] | [Basic] | [Current Value] | [Variable] [Name]: Var3
[Touch] | [Operation] | [Type] | [Bit]
[Operation] | [Toggle]
[Destination] | [Variable] [Name]: Var3
[Detail] | [Security] | 5

#### Switch object (Name: Switch1) properties: B-1

Default value

## Set up Scripts

### Project Explorer : [Screen Design] ➞ [Screens] ➞ [Screen1]

Set the following script on the object.

From the [Tool Chest] drag and drop the script to the Script editor.

#### Switch object (Name: Switch1) script: B-1

Legend | Block
1 | [Triggers] ➞ [Touch] ➞ [Touch]
2 | [Operations] ➞ [HMI Functions] ➞ [Security]
3 | [Values] ➞ [Screen Object]