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:
_idreturns the _id of the current user.usernamereturns the username of the current user.namereturns the name of the current user in the current environment.languagereturns the language of the current user in the current environment.localereturns the locale of the current user in the current environment.themereturns the theme configuration of the current user in the current environment.environmentEmailreturns the email address of the current user in the current environment.disableCachereturns whether the user has disabled cache in the current environment.administratorreturns whether the user is an administrator in the current environment.isVisitorreturns 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), Polish (pl), and Romanian (ro). 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 totrueif the user is working in a web browser.DEVICE(["phone","tablet])will resolve totrueif the user is working on either a phone or a tablet.