Design the user interface for different users¶

Premise

Below are some typical procedures for designing a user interface with elements that vary dynamically depending on the user. All these procedures exploit the {Session} alias.

Prerequisites

To execute the procedures shown below, users and groups must have been configured (see Configuring Users and Groups).

Set a label to display the name of the current user

  1. Create a Label object.

  2. In the Text property, set a dynamic link with Alias > {Session} > Session > User > User, then click Select

    Note

    the value of the Text property is therefore determined by the BrowseName attribute of the object corresponding to the current user.

Display an object to a user group only

  1. Select the desired graphical object.

  2. In the Visibility property, set a dynamic link with Alias > {Session} > Session > Groups, then click Select

  3. Select the group enabled for display of the graphical object, then click Select.

    Note

    the Visibility property of a graphical object has a Boolean value. If the current user at runtime is part of the selected group, the value of the property at runtime is set to True and the object is therefore visible.

See also

Related concepts

Users and Groups

Sessions and locale

Related procedures

Configuring Users and Groups