View aspects
How view aspects give one table several form and list views, how users reach them and how scripts tell which one is open.
A view aspect is a named set of form and list views for a table, so one record can look different to different users. Administrators and developers use aspects to give, for example, self-service users a simpler form than agents see.
What an aspect changes
The record’s data is the same in every aspect. What changes is the layout: which fields show, where they sit, and how each field behaves. A field can be required in one aspect and optional in another. Scripts can also run differently per aspect.
A table has no aspects until you create one. Without an aspect, users see the table’s default views. Creating an aspect copies the default views of the table into a new set under the aspect’s name. You then configure the form layout and list layout of the aspect separately from the default.
How users reach an aspect
An aspect is chosen by the URL, not by the user’s role. The aspect name is the last part of the address.
| View | Address |
|---|---|
| Default form | #/<Table>/<record id> |
| Form in an aspect | #/<Table>/<record id>/<Aspect> |
| Default list | #/<Table> |
| List in an aspect | #/List/<Table>/<Aspect> |
Name a self-service aspect SelfService. After a user submits a catalog request, the Service Portal opens the new record in the SelfService aspect.
Aspects and security
An aspect is not a security boundary. Anyone who knows the address can open any aspect of a table they can read. Hiding a field in an aspect does not stop a user reading it in another aspect. Secure fields and records with permissions. See Permissions: table, field and transition.
Aspects in scripts
UI events receive the open aspect in the viewAspect variable. It is null when the form opens in the default view. Use it to run field behaviour, or Sofi features, in some aspects only. Table operations can read the aspect in their condition too.