AMS DocumentationAMS

Setting Visibility Rules

AMS includes a common method for defining the visibility of cards and fields across the application. The Visibility attribute on Cards and Fields allows control over when a Card or Field will be shown on the user’s device.

A visibility rule works by comparing an existing value in the current message with a value defined in the rule. It uses a comparison type (such as “is” or “is not”) to determine if the rule should be applied and the field displayed on the screen.

To create a visibility rule for a field change the Visibility option, after which additional options will appear as shown below.

Available visibility options are:

Option Description
Always Card/Field will be shown at all times to all users
Shown When Card/Field will be shown only when the specified conditions are met
Hidden When Card/Field will be shown except when the specified conditions are met

To remove a visibility rule just change the first popup menu “Always”.

When defining the conditions which control visibility it is possible to specify that “all” conditions must be true, or that “at least one”. This gives an “AND” and “OR” type option.

The following screenshot illustrates a sample Visibility rule where the Card will only be visible for Fixed Term and Commercial Leases with Addresses that include “Wellington” where the overall condition is “Not clean & tidy”:

Card Visibility Example

Configuration of Visibility Rules

Visibility can be configured as follows:

Mode Attribute Checked Validation Available Compared with
Value for The data item selected from the current Card. Meta data items, string fields, text fields and choice groups can be used as the source of a value from the message

Depends on the type of data item being checked, but can include:

  • is
  • is not
  • contains
  • does not contain
  • has value (i.e. NOT blank)
  • does not have value (i.e. IS blank)
  • starts with
  • ends with
  • matches regex

Depends on the type of data item being checked, but can include:

  • Choice Group - one or more of the items defined within the group
  • Text Item - text string
Message Status Message Status
  • is
  • is not
  • New
  • Sent


An example is a Job message where a message representing a job is sent to a device.

The Job has a meta data item with a label of “STATUS”. When the job is sent out the value of “STATUS” is “PENDING”. A user is required to “accept” a job before more information is available. A message also needs to be sent back to the office to show that the user has accepted the job.

To do this, the default value of the “STATUS” meta data key to be “PENDING” with visibility rules added to other fields in the message so that these are only visible to the user once the job has been accepted.