Changing Page or Page Element Labels Using Expressions
In the Label field of a page or page element, you can now enter an expression that may automatically change the label displayed on the app. You can set a dynamic or static label that appears when the expression evaluates to true or false. In your expression, you can access data stored in the mobile state which may appear in your label or used for evaluation.
For example, you want to automatically update the label of a page based on the role. You want warehouse operators to always see the Scan Item label for the item entry field within the PO Receiving process. Otherwise, the app displays the Enter Item label for other roles. In the Label field for the corresponding Text Box element, you can enter this expression:
[[{{state:datarecord:system:roleid}} == 'Warehouse Operator' ? 'Scan Item' : 'Enter Item']]
To access the Label field of a mobile page or page element within a mobile process, see any of the following topics:
-
For standard mobile processes, see Configuring Mobile Page Elements
.
-
For custom mobile processes, see Customizing Mobile Pages or Customizing Mobile Page Elements.
For more information about accessing data from mobile states that you can include in your expressions, see Accessing Data Stored in the State.