Skip to content

System Expressions

With system expressions you can access valuable information about the current user, and even whether the user is working on a phone, tablet, or web environment. Using this information you can customize your process flow to perfectly align with the users' needs at any moment. Moreover, system expressions give you the power to use environment settings in your model as well as translate the content for users into the language of their choice.

Current User Information

With the USER[] expression you can information about the current user. This information can be used to automatically fill fields, for instance.

Parameters

The USER[] expression can take the following parameters:

  • _id returns the _id of the current user.
  • username returns the username of the current user.
  • name returns the name of the current user in the current environment.
  • language returns the language of the current user in the current environment.
  • locale returns the locale of the current user in the current environment.
  • theme returns the theme configuration of the current user in the current environment.
  • environmentEmail returns the email address of the current user in the current environment.
  • disableCache returns whether the user has disabled cache in the current environment.
  • administrator returns whether the user is an administrator in the current environment.
  • isVisitor returns whether the user is a visitor in the current environment.

Environment Settings

In the environment settings you can store all kinds of in information which you can then use throughout your entire model. You can create a dependency on that setting and, by doing so, affect large parts of your model by simply changing the setting when required.

Syntax

SETTING[setting]

  • setting - The name of the field in the settings document definition you want to use the setting from.

T for Translations

In BizzStream you can create your own library of translations in English (en), Dutch (nl), German (de), French (fr), Spanish (es), and Polish (pl). This way you can optimize your process for any foreign users you might add to your environment.

Syntax

T[translation-key]

  • translation-key - The translation key in your translations collection. This can either be a string or an expression.

Examples

  • T["submit"] will result in "Indienen" if the user's language is configured to Dutch.
  • T[F["action"]] will result in "Goedkeuren" if the user's language is configured to Dutch and the value of the "action" field is "approve".

Customize for Device Type

Different devices provide different user experiences. Why should you try to find a middle ground if you can also optimize your process per device type. With the DEVICE expression you can make sure that the user has the best experience with your model, no matter the device they are working on. The expression will resolve to true if the device reference matches the device type the user is using. BizzStream recognizes the following device types:

  • web
  • phone
  • tablet

Syntax

DEVICE(device-reference)

or

DEVICE(array)

  • device-reference - A reference to the device type you want to execute this expression for

Examples

  • DEVICE("web") will resolve to true if the user is working in a web browser.
  • DEVICE(["phone","tablet]) will resolve to true if the user is working on either a phone or a tablet.