FSM Mobile Element Reference
This topic is intended for administrators and developers who configure elements in Field Service Management (FSM) Mobile.
In FSM, an element provides an input, a displayed value, a heading, or a table in FSM Mobile. Its type determines how it presents data. Its properties control the label, value, appearance, and input rules. An element definition doesn't itself create a NetSuite field or establish how its value is saved to NetSuite.
For configuration hierarchy, merge behavior, updating, and configuration preview, see FSM Configuration.
This reference includes the following sections and topics:
Configuring Elements
Define elements in routes/mobile.<resource ID>.element. The element property is an object: each property name identifies an element, and its value defines that element's type and properties. Use a unique element name within the resource, including its table children. FSM uses this property name as the element's name.
For example, this fragment adds two elements to an existing resource's element object:
{
"inspection_heading": {
"type": "heading",
"label": "Inspection",
"level": 2
},
"inspection_notes": {
"type": "textarea",
"label": "Inspection Notes",
"rows": 6,
"maxlength": 4000
}
}
The heading element displays section text. The textarea element provides an editable notes field. Configure the resource's article mapping separately if the notes must be read from or saved to a NetSuite field. Adding an element alone doesn't provide that mapping.
Elements can also be generated from a NetSuite custom form and then modified in the resource's element object. The resource's form property controls form loading. For information about form properties, field translation, and pattern overrides for generated elements, see FSM Mobile Resource Properties Reference.
Element Configuration Conventions
The tables list each element's value format, accepted values, defaults, and properties that control behavior. The tables use the following conventions:
-
Default is the fallback used when no value for that property is supplied by the combined configuration or a loaded form.
-
An existing standard or form-generated property remains in effect unless it is overridden.
-
A configured or form-generated
valuetakes precedence over the type's initial-value fallback. -
The per-type property table also identifies defaults that vary with the original NetSuite field type.
-
Supply accepted values rather than relying on the handling of invalid values.
-
-
Static value means a literal configuration value rather than an expression.
-
The Accepted values columns identify the literal values that a property accepts.
-
Where a property is calculated by an FSM Mobile expression, its evaluated result must also be accepted for that property.
-
-
nullis an explicit JSON value, not the text string"null". Where it is listed as an accepted or default value, it represents the property-specific no-value or no-constraint state. -
""is an explicit empty string. It is distinct fromnull. Use it only where an empty string is an accepted value or default. -
Boolean values are the lowercase, unquoted JSON literals
trueandfalse. A quoted value, such as"true","false","True", or"False", is a string rather than a Boolean value. -
An omitted property has no configured value.
undefinedis not a JSON configuration value. -
parentcreates a parent-child relationship between atableelement and one of its column elements.-
Set it only on a direct child of a table, and set its value to that top-level table element's
name. -
The child is then structured within each row of the parent table. It is not a separately rendered top-level element.
-
Don't use
parentto nest ordinary elements, to create nested tables, or to reference an element that is not"type": "table".
-
Boolean Values
Configure Boolean properties, such as required, disabled, hidden, readonly, multiple, and stepper, with the unquoted literals true or false. Quoted Boolean-looking text can produce unexpected behavior. A Boolean expression must also evaluate to true or false, not text.
For backward compatibility, the exact checkbox static value strings "T", "F", "true", and "false" are converted to Boolean values. This exception applies only to a checkbox element's value, not to properties such as hidden or required. The strings "True" and "False" are not recognized for checkbox value.
Template Tags and Mobile Expressions
Template tags can supply element configuration values when the server prepares the resource. Expressions in FSM Mobile calculate values for supported properties and can update those values when referenced data changes.
The property tables identify FSM Mobile expression support. A template tag or expression must resolve to a value accepted by the property. Keep structural properties, such as type, name, parent, column, and index, fixed for the element definition. The multiple property of the select element supports Boolean expressions. For syntax, available data, evaluation, and examples, see FSM Expressions and Template Tags.