FSM Mobile Element (Block) Reference
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 Preview, see FSM Configuration.
This reference covers the following areas:
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 displays section text. The textarea 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. See FSM Mobile Resource Properties Reference for the form properties, field translation reference, and pattern overrides of generated elements.
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".
-
Value Defaults
A static value sets the initial default when FSM Mobile creates a new record. It doesn't reset or replace the value of a record that already exists. If value is configured as an expression, FSM Mobile can calculate or update the value when the expression runs in its applicable default or change context. The expression result must be accepted for the element type.
date and datetime use the current date or date-time only when "value" is omitted. To leave either element blank on a new record, explicitly set "value": "". This matches the stored blank representation. null is also normalized to "" for these types.
Form-Generated Properties and Initial Values
When a resource uses form, FSM loads the NetSuite form and translates its fields into elements for FSM Mobile. FSM then applies the resource's explicit element configuration over those definitions. A property can therefore be present in the generated element even when it is absent from the custom JSON.
Form loading supplies two separate kinds of information:
-
Field information and initial values: The field ID supplies the element name. The field label, required status, read-only status, disabled status, and hidden status can supply the corresponding element properties. If NetSuite supplies an initial field value during form loading, FSM carries that value into the element's
value. Select options are also loaded unless disabled by the form configuration. -
Properties added by FSM: The original NetSuite field type determines the FSM Mobile type and generated properties. For example, Text receives
maxlength: 300. Text Area receivesmaxlength: 4000androws: 6. Long Text receivesmaxlength: 1000000androws: 12. These are FSM translation defaults. The form loader doesn't read NetSuite field restrictions formin,max,maxlength, orpattern.
A form-generated value, including an empty value supplied by NetSuite, takes precedence over the FSM Mobile type's initial-value fallback unless the element configuration overrides it. Initial values for fields loaded from a form vary with the field and record initialization context. Existing records use their loaded record values rather than being reset to these new-record defaults.
Omitting a property from an element override retains the generated property. Changing only type can also retain properties generated for the original field. Explicitly configure any affected properties, such as maxlength and rows, for the intended result.
The Property Support and Defaults by Element Type table identifies the relevant properties and defaults that vary by element type. See FSM Mobile Resource Properties Reference for the complete NetSuite field translation and form-loading options.
Check initial values as well as user-entered values against the element's effective limits. For example, a Text element generated from a form can receive a 500-character initial value and retain maxlength: 300. Loading the value doesn't automatically shorten it or increase the limit. Correct the initial value or configure an appropriate limit that the destination NetSuite field also accepts. Increasing a FSM Mobile limit doesn't change the NetSuite field's capacity.
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 supported properties and can update property values when referenced data changes. These are different mechanisms.
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. Select multiple supports Boolean expressions. For syntax, available data, evaluation, and examples, see FSM Expressions and Template Tags.
Element Types
The value columns describe the value property for each element that stores a value. The columns list its format, accepted static values, and initial fallback. The fallback applies when neither configuration nor a loaded form supplies value for a new record. To override a type-based default or form-generated initial value, configure "value" with an accepted static value or an expression. The display-only heading element has no "value" property.
|
Type |
Description |
Value Property Format |
Accepted Static Value |
Default Value for a New Record |
|---|---|---|---|---|
|
|
A box with a true or false value. |
Boolean |
|
|
|
|
A calendar date. |
String ( |
A valid canonical date, |
Current date. To leave the value blank on a new record, set |
|
|
A date and time. |
String ( |
A valid canonical date and time, |
Current date and time. To leave the value blank on a new record, set |
|
|
A single-line email address field with a basic input-format check. |
String |
Text. The editable input flags values that don't match |
|
|
|
A file upload and download field. |
File object |
A file object supplied by the FSM Mobile upload flow, or |
|
|
|
A display-only section heading. Its text is supplied by |
None |
Not applicable. |
Not applicable. |
|
|
An HTML-content field. In read-only mode its value is rendered as HTML. Otherwise it is edited as multiline text. |
String |
HTML or plain text. |
|
|
|
An image capture or upload field. |
Image/file object |
An image object supplied by the FSM Mobile upload or camera flow, or |
|
|
|
A numeric field, optionally formatted with a unit. |
Number |
Any numeric value. Use |
|
|
|
A masked single-line text field. |
String |
Any text. Apply |
|
|
|
A list from which a user selects one or more options. |
Object, or array of objects |
For single selection, one |
|
|
|
A signature capture field. |
String |
A signature value supplied by the FSM Mobile signature capture flow. |
|
|
|
A repeating row container and the only supported parent element type. Define its direct child column elements with |
Array of objects |
An array of row objects whose keys are the names of the table's column elements. |
|
|
|
A single-line telephone field. |
String |
Any text. Apply |
|
|
|
A single-line text field. |
String |
Any text. Apply |
|
|
|
A multiline plain-text field. |
String |
Any text. Apply |
|
|
|
A time of day. |
String ( |
A valid canonical time, |
|
|
|
A web-link field. |
String |
Any text. Apply |
|
Other Element Types
The following type names are aliases or backward-compatible element types. When FSM Mobile loads one of these types, it resolves it to the listed base element type and applies the shown properties and values at runtime. The alias can remain in the configuration. The generated properties are not written back to it.
For new configuration, use the base element type and set the required properties explicitly. This makes the intended behavior and dependencies easier to see.
|
Alias or Compatibility Element Type |
Base Element Type |
Generated Properties or Behavior |
|---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
A field ID that matches the signature naming pattern becomes |
|
|
|
|
|
|
|
No additional properties. |
|
|
|
No additional properties. |
|
|
|
Uses the |
|
|
|
Uses the |
|
|
|
Deprecated compatibility type. It is hidden and uses |
|
Unsupported type, for example |
|
Compatibility fallback. It is hidden. Don't use it as an element type. |
The float and percent aliases use the precision values in Other Element Types without adding an increment rule. Configure a positive numeric step when an increment is required.
Table Element Structure
A table holds repeating rows. Define the table and its child elements in the same resource's element object. Set each child's parent to the table's element name. Use column to select the values displayed in the table's list view and their order.
For example, add this fragment to the resource's element object:
{
"materials": {
"type": "table",
"label": "Materials"
},
"description": {
"type": "text",
"parent": "materials",
"label": "Description",
"column": 1
},
"quantity": {
"type": "number",
"parent": "materials",
"label": "Quantity",
"min": 0,
"step": 1,
"column": 2
}
}
Each row contains values named for the child elements. A table value can therefore look like this:
{
"materials": [
{ "description": "Filter", "quantity": 2 }
]
}
The first example defines elements. The second illustrates their data. Neither example defines how those values are saved to a NetSuite sublist. Configure the resource's article mapping for that purpose.
Use parent only for direct children of a top-level table. Don't use it to nest tables or ordinary elements. A child whose parent is missing or is not a table may not appear in the intended form or table.
Element Properties
Properties configure an element's displayed label, stored value, validation, and input behavior. All elements except the display-only heading element support the common properties. Each type also has the properties listed in Element-Specific Properties. Resource preparation properties and shared-list elements are described separately.
Common Element Properties
Except for the display-only heading element, every element supports the following common properties. The common properties supported by heading are type, name, parent, label, and hidden. It also supports the type-specific level property. See the element-specific table and support matrix.
|
Property |
Description |
Format and Accepted Values |
Expressions |
Default |
|---|---|---|---|---|
|
|
The element type. Include it in each manually defined element. |
String One of the types in Element Types. |
No (structural property) |
Required for a manually defined element. A loaded form supplies its generated type. |
|
|
Stable identifier used to store and reference the element value. |
String A unique element identifier within the resource, including its table children. |
No (structural property) |
Supplied by the property name in the resource's |
|
|
Identifies the parent table that owns this column element. |
String The |
No (structural property) |
Omitted (top-level element) |
|
|
Sets a static default for a new record, or a calculated value when configured as an expression. A static value doesn't replace a saved value when an existing record is opened. |
Type-specific See the element's format type in Element Types. |
Yes (result must match the element format). |
A loaded form can supply an initial value. Otherwise, use the type-specific fallback in the element table. |
|
|
Label shown with the element. |
String Any display text. |
Yes (String result). |
|
|
|
Requires a non-empty accepted value before the form can be completed. |
Boolean
|
Yes (Boolean result). |
|
|
|
Displays the element but prevents user input. |
Boolean
|
Yes (Boolean result). |
|
|
|
Doesn't display the element. |
Boolean
|
Yes (Boolean result). |
|
|
|
Displays the value without allowing edits. |
Boolean
|
Yes (Boolean result). |
|
|
|
Additional supported style class token(s). Use only documented styling tokens. |
String A supported class token string. |
Yes (String result). |
|
Element-Specific Properties
The following properties are in addition to the common properties. A property is only supported for the listed types.
|
Property |
Description |
Supported Types |
Accepted Values and Expressions |
Default |
|---|---|---|---|---|
|
|
Sets the file-type filter shown by the browser file picker. |
|
Comma-separated file extensions or MIME-type specifiers. Configure, for example, Expressions: Yes (String result). |
|
|
|
Selects the only option automatically when no option is marked selected. Applies only to single-select lists. |
|
Expressions: Yes (Boolean result). |
Set explicitly. See Select Defaults and Stored Values. |
|
|
Enables device barcode scanning where the device or browser can provide camera access. |
|
Expressions: Yes (Boolean result). |
|
|
|
Enables image capture from the device camera. |
|
Expressions: Yes (Boolean result). |
|
|
|
Selects an element for a list column and controls column order. For a top-level element, this affects the Resource Index. For a table child, it affects the table list. |
Top-level elements and direct children of |
A numeric position, such as Expressions: No (list structure) |
FSM can assign columns to the first visible elements when fewer than two have been configured. |
|
|
Sets the visible text width. |
|
Positive integer. Expressions: Yes (positive integer result). |
|
|
|
Sets the maximum width or height, in pixels, for images in supported formats before upload. FSM Mobile preserves the image proportions. This is not a file-size limit. |
|
Positive whole-number pixel value, for example Expressions: Yes (positive integer result). |
Resource |
|
|
Sets the signature input height. |
|
Positive pixel value. Expressions: Yes (positive integer result). |
|
|
|
Sets the heading level. |
|
Expressions: Yes (integer result from |
|
|
|
Sets the maximum permitted numeric, date, or time value. It doesn't set a text character limit. Use |
|
Number for Expressions: Yes (result must match the element type). |
|
|
|
Sets the maximum character count for editable text entry. |
|
Positive integer. Expressions: Yes (positive integer result). |
|
|
|
Sets the client-side size limit, in KB, for non-bitmap files selected through a File element. It is not applied by an Image element. Recognized bitmap files selected through a File element are down-sampled instead and bypass this limit. |
|
Positive whole-number KB value. Expressions: Yes (positive integer result). |
|
|
|
Sets the minimum permitted numeric, date, or time value. |
|
Number for Expressions: Yes (result must match the element type). |
|
|
|
Allows more than one option to be selected. The selected value must match the resulting selection mode. |
|
Expressions: Yes (Boolean result). |
|
|
|
Defines the options that a Select element presents. Hidden shared-list elements can also supply options to other elements. |
|
A static list is an array of option objects. A configured option source or expression must resolve to an array of option objects. See Configuring the Select options Property. Expressions: Yes (array result for Select inputs). |
|
|
|
Validates input against a regular expression during article validation. Email retains its built-in live email-format check. A configured pattern doesn't replace that check in the editable Email input. |
|
Valid regular-expression source string. Expressions: Yes (valid regular-expression String result). |
|
|
|
Displays hint text when the field has no value. |
|
String. Expressions: Yes (String result). |
|
|
|
Sets the maximum decimal places in the editable control and display when no unit precision or |
|
Whole number from Expressions: Yes (whole-number result from |
|
|
|
Loads Select options from the server on demand. Requires a connection and an option source configured for the request. With |
|
Expressions: Yes (Boolean result). |
|
|
|
Sets the visible text height. |
|
Positive integer. Expressions: Yes (positive integer result). |
|
|
|
Enables search within this element's Select list. This is separate from resource-level search on the Resource Index. |
|
Expressions: Yes (Boolean result). |
|
|
|
Sets the permitted increment. |
|
Positive number for Expressions: Yes (result must meet the type-specific increment rule). |
|
|
|
Shows numeric increment and decrement controls. |
|
Expressions: Yes (Boolean result). |
|
|
|
Provides display text for a read-only URL. The URL remains the |
|
String. Expressions: Yes (String result). |
|
|
|
Selects the unit used for number display formatting. |
|
Unit identifier string. Expressions: Yes (String result). |
|
|
|
Sets the signature input width. |
|
Positive pixel value. Expressions: Yes (positive integer result). |
|
Element Definition and List Properties
The following properties control resource preparation and list presentation. These properties are separate from the input properties in the preceding tables.
|
Property |
Purpose |
Accepted Value |
Default |
|---|---|---|---|
|
|
Inserts the element at a position in the resource's element order. Use |
Non-negative whole number. |
Element definition order. |
|
|
Uses this element's displayed value, with its label when present, as the individual record page title. Set it on one value-carrying top-level element. A hidden element can supply the title. |
|
No configured title element. |
|
|
Supplies this element's field mapping when the resource uses |
A valid field mapping for the element's data shape. |
A mapping derived from the element name and type when automatic mapping is enabled. |
|
|
Registers a loaded supporting element for expressions in other resources. The URI can differ from the element's name. |
A unique string that is a valid JavaScript identifier, such as |
Not registered for cross-resource references unless configured. |
|
|
Selects the Text Enhance prompt for an editable |
Prompt internal ID as a string. |
The configured cleanup prompt when the feature is enabled, |
Use fixed values for index, title, and uri. An explicit article map takes precedence over an element's automatic mapping. For mapping syntax and record searches, see FSM Searches and Field Mapping. For the resource's automap property, see FSM Mobile Resource Properties Reference.
For Text Enhance enablement, prompt setup, and availability, see Enhanced Technician Notes. Setting an element's prompt doesn't itself enable that feature.
Shared Option Lists and URI References
A hidden Text element can hold shared options for other elements without providing an interactive Select input. Its uri registers the element for cross-resource references.
During rendering, FSM removes an option array if the element's hidden and value properties both contain values treated as true. This applies when options is already an array at that stage, including a static option list. An empty array or object in value is also treated as true. Leave value omitted when defining a hidden shared-list element whose option array must remain available. This removal happens before option-search resolution. It doesn't remove every hidden element's options.
For the complete supplier and consuming Select examples, resource-loading rules, and refresh behavior, see Sharing Data Between Resources. See FSM Expressions and Template Tags for URI reference syntax and expression scope. Each consuming Select still needs its own selected value and save mapping.
File and Image accept Behavior
Use accept to filter the file types offered by the device's file picker. Specify a comma-separated string of file extensions or MIME-type specifiers. For example, this fragment defines two elements:
{
"attachment": {
"type": "file",
"accept": ".pdf,.docx,.xlsx",
"maxsize": 10240
},
"photo": {
"type": "image",
"accept": ".jpg,.jpeg,.png"
}
}
The following table compares the default and configured picker filters.
|
Element Type |
Default Picker Filter |
Explicit |
|---|---|---|
|
|
No filter. |
Applies the configured filter. |
|
|
|
Replaces the default filter for existing-file selection. With |
accept guides file selection. It doesn't validate the upload. Device and browser behavior can allow files outside the filter. Don't rely on this property to enforce permitted file types.
downsample limits the largest image dimension and preserves the image proportions. It processes PNG, JPG/JPEG, GIF, and BMP images. It doesn't convert other file formats. The standard routes/mobile.imagesize value is 1080 pixels. An element can override it with downsample.
maxsize applies to non-bitmap files selected through a File element. The selected file must be smaller than the configured limit in KB. For example, 10240 specifies 10 MB. Recognized bitmap images use image processing instead and bypass this check. Image elements don't enforce maxsize. Neither property guarantees that NetSuite will accept the file during upload.
The device and browser determine how camera capture is offered. Don't assume that camera: true selects a particular camera or guarantees that existing files cannot be selected.
Property Support and Defaults by Element Type
The following table brings together each type's relevant properties and their defaults. C means that all Common Element Properties are supported: type, name, parent, value, label, required, disabled, hidden, readonly, and class. Initial-value fallbacks are listed in Element Types. A loaded form can supply a different initial value as explained in Form-Generated Properties and Initial Values.
The defaults apply only when a combined configuration or generated form definition doesn't already supply the property. Where the original NetSuite field type changes the result, the final column identifies that variation. heading supports only the properties listed in its row. Top-level elements and direct table children can also use column. For the column property, see Element-Specific Properties.
|
Type |
Common Properties |
Supported Type-Specific Properties |
Type-Specific Defaults and Form Variations |
|---|---|---|---|
|
|
C |
None |
No additional properties. A form can supply a checked or unchecked initial value. |
|
|
C |
|
|
|
|
C |
|
|
|
|
C |
|
|
|
|
C |
|
|
|
|
Subset supported, as listed in the next column. |
|
|
|
|
C |
|
|
|
|
C |
|
The default |
|
|
C |
|
|
|
|
C |
|
|
|
|
C |
|
|
|
|
C |
|
|
|
|
C |
No additional properties. It is the only supported parent element type, and direct child elements use its |
No additional property defaults. Configure each child's limits separately. |
|
|
C |
|
|
|
|
C |
|
|
|
|
C |
|
|
|
|
C |
|
|
|
|
C |
|
|
The following element-definition fragments show the static type defaults. The form-generated variations in the table still apply. Time steps are in seconds. Signature dimensions are in pixels. Character limits are character counts. The reference tables describe runtime dates, generated names, image filters, and values that vary by account.
date default properties
{
"type": "date",
"min": null,
"max": null,
"step": null
}
datetime default properties
{
"type": "datetime",
"min": null,
"max": null,
"step": 1
}
email default properties
{
"type": "email",
"pattern": "",
"placeholder": ""
}
heading default properties
{
"type": "heading",
"level": 1,
"label": "",
"hidden": false
}
html default properties
{
"type": "html",
"rows": 3,
"cols": null,
"placeholder": ""
}
image default properties
{
"type": "image",
"camera": false
}
number default properties
{
"type": "number",
"min": null,
"max": null,
"precision": 8,
"step": null,
"stepper": false,
"unit": ""
}
password default properties
{
"type": "password",
"pattern": "",
"placeholder": ""
}
select default properties
{
"type": "select",
"multiple": false,
"barcode": false,
"options": [],
"placeholder": "",
"remote": false,
"search": false
}
signature default properties
{
"type": "signature",
"width": 448,
"height": 148
}
tel default properties
{
"type": "tel",
"pattern": "",
"placeholder": ""
}
text default properties
{
"type": "text",
"barcode": false,
"maxlength": 300,
"pattern": "",
"placeholder": ""
}
textarea default properties
{
"type": "textarea",
"maxlength": 4000,
"rows": 6,
"cols": null,
"placeholder": ""
}
time default properties
{
"type": "time",
"min": null,
"max": null,
"step": 60
}
url default properties
{
"type": "url",
"pattern": "",
"placeholder": "",
"text": ""
}
Configuring the Select options Property
Use the options property on a select element to define the choices shown to the user. options is not the selected value or a single option ID. It supplies the list from which the element's value is selected.
You can supply that list in three ways:
-
Static options - Configure an array of option objects directly on the element.
-
An expression - Configure an expression that returns an array of option objects. The expression can reuse or filter another element or resource's option list, for example
consumable.options. -
A NetSuite search definition - Configure an option source that identifies the record to search and the fields to use for option IDs and labels. FSM Mobile runs the search and resolves the results to an option array at runtime.
In every case, the resulting options value must be an array of option objects. Configure a static value, or a value expression, separately when you need to set the initial selected option or options.
Option Objects and Sources
Each option requires a unique string id and a string label. The label is displayed to the user. An option can also contain properties used for defaults, grouping, or filtering.
|
Option Property |
Required |
Accepted Value |
Behavior |
|---|---|---|---|
|
|
Yes |
String |
Identifies the option. Retained in the selected value. |
|
|
Yes |
String |
Displayed option text. Retained in the selected value. |
|
|
No |
|
Supplies a default selection when the element has no explicit |
|
|
No |
String |
Groups options under a displayed heading. |
|
|
No |
|
Prevents selection of the option. |
|
Additional properties |
No |
Values required by the configuration. |
Remain in the option list for expressions to use. Local search also checks string-valued properties, such as |
For example, this fragment supplies a static option list and one default selection:
{
"inspection_result": {
"type": "select",
"label": "Inspection Result",
"autoselect": false,
"options": [
{ "id": "pass", "label": "Pass", "selected": true },
{ "id": "fail", "label": "Fail" }
]
}
}
A NetSuite search-based source supplies the same option structure through record, filters, and map. The map must return id and label. It can also return other properties. For remote searching, configure the source to use the request's search text. Setting remote and search alone doesn't create a suitable search filter.
Detailed search definitions and mapping syntax belong in FSM Searches and Field Mapping. Expression syntax and template tag handling belong in FSM Expressions and Template Tags.
Select Defaults and Stored Values
When value is omitted, options marked selected: true supply the initial selection: one option for single-select, or the selected options for multi-select. An explicitly configured value takes precedence. Set autoselect: true to select the sole option automatically in a single-select list, or autoselect: false to prevent that automatic selection. Configure autoselect explicitly when the distinction matters. The empty value is null for single-select and [] for multi-select.
After a Select has initialized, changing its options can remove selections whose IDs no longer appear in the list. Options marked selected: true, or sole-option selection when autoselect permits it, can then supply a replacement value. A value supplied initially is not guaranteed to remain unchanged after the options change.
multiple can use a Boolean expression. When it resolves to false, value must be one { id, label } option object or null. When it resolves to true, value must be an array of these option objects. [] means no selection. A value expression must return the shape that matches the resulting mode. Don't assume that changing multiple automatically converts an existing value to the other shape.
A Select value retains only the selected option's id and label. It doesn't retain selected, optgroup, disabled, altname, or other additional option properties. Use an expression that looks up the selected id in options when another option property is needed.
Option Search Behavior
The search property controls the Select search interface. For local options, FSM Mobile compares the search text with every string-valued property on each option. This allows a non-displayed property such as altname to make an option discoverable without changing its label. When an element uses a NetSuite search definition and remote is true, FSM Mobile retrieves matching options on demand.
Configuring Number Elements
Use number for whole numbers, decimal measurements, currencies, percentages, and other numeric values. Configure precision, increments, and units for the required behavior. The compatibility aliases in Other Element Types resolve to this base type.
|
Usage Pattern |
Recommended Configuration |
Result |
|---|---|---|
|
Whole numbers |
|
Limits entry and display to whole numbers. |
|
Decimal measurements |
Set |
Supports decimal entry and enforces the increment. |
|
Currency |
Set |
Formats the value using the unit definition, for example a |
|
Percentage |
Set |
Adds the configured percent suffix. The unit formats the stored number directly. For example, |
|
Data size |
Set |
Read-only rendering scales values through K, M, and G prefixes as appropriate. |
|
Other measurements |
Set |
Uses the configured formatting and stores a number. |
Number Property Interactions
The following table describes how number properties interact.
|
Property |
Accepted Values |
Default |
Interaction and Behavior |
|---|---|---|---|
|
|
Number. Numeric strings are also coerced during resource normalization. |
|
The numeric value stored by the element. For new configuration, use a JSON number literal, such as |
|
|
Number or |
|
Defines inclusive validation limits. |
|
|
Whole number from |
|
Limits the number of decimal places that a user can enter and that FSM Mobile displays when neither a unit precision nor |
|
|
Positive number or |
|
The permitted increment used for validation and numeric stepping. When no unit precision applies, a whole-number |
|
|
Boolean. |
|
Shows increment and decrement controls. It works with |
|
|
String identifier or |
|
Selects a named Number formatting profile from the mobile context's unit collection. A matching profile can set the effective input and display precision and add a prefix or suffix. It doesn't change the stored number or set |
Unit Definitions Used by Number
unit is a key that identifies a named formatting profile. It is not a separate element type and doesn't convert the stored number. FSM Mobile looks up the configured key in the mobile configuration's "units" collection. If it finds a definition, it uses the definition's formatting members when it renders the Number element.
A unit definition doesn't set the Number element's min, max, step, stepper, or value properties. If the definition includes precision, that precision takes precedence over the element's precision and any precision inferred from step. Magnitude scaling can then apply two decimal places to large values. Precision affects both the editable Number control and display.
The standard routes/mobile.units object supplies these formatting definitions:
{
"routes/mobile": {
"units": {
"usd": { "prefix": "$", "precision": 2 },
"percent": { "suffix": "%" },
"byte": { "suffix": "B", "precision": 0, "multiple": 1024 },
"celsius": { "suffix": "°C" },
"fahrenheit": { "suffix": "°F" }
}
}
}
You can add an account-specific unit by adding another key to the mobile configuration's "units" collection, then setting the Number element's "unit" property to that key. For example:
{
"routes/mobile": {
"units": {
"jpy": { "prefix": "¥", "precision": 0 },
"kilogram": { "suffix": " kg", "precision": 2 }
}
}
}
With these definitions, "unit": "jpy" displays a whole-number amount with a yen prefix. "unit": "kilogram" adds the kg suffix and limits precision to two decimal places without padding trailing zeros. For example, 2.5 can display as 2.5 kg. Unit formatting doesn't change the stored number or convert its measurement.
Unit-definition members are renderer settings rather than Number-element properties. The FSM Mobile renderer reads these members directly. The following table describes the supported unit-definition members.
|
Unit Member |
Configuration Guidance |
Effect |
|---|---|---|
|
|
String |
Added before the displayed number. |
|
|
String |
Added after the displayed number. |
|
|
Use a whole number from |
Overrides the element's |
|
|
Use a positive numeric factor greater than |
Scales the read-only display by this factor and adds K, M, or G before the suffix. Scaled values use two decimal places at most. The stored number is unchanged. |
The Celsius suffix is the two-character text °C: Unicode degree sign ° (U+00B0), followed by uppercase C. Use that literal text in JSON. Don't use the HTML entity °C, because unit suffixes are rendered as text rather than decoded as HTML.
Available units depend on the merged configuration. Preserve the standard unit definitions that existing elements use when changing routes/mobile.units.
Property Validation Rules
Configure validation properties for the intended values, including values supplied through defaults, mappings, and expressions.
-
requiredchecks for a non-empty value. For a required table, at least one row is needed. Each row's child elements have their own rules. -
minandmaxset inclusive limits for numbers, dates, times, and date-times. -
A Number
steprequires a multiple of that increment, measured from zero. For example, withstep: 0.25,1.25is valid and1.30is not. Settingmindoesn't shift the numeric increment base. -
A Date
stepuses the configuredminas its base, or1970-01-01whenminis omitted. Dates use days. Times and date-times use seconds. For minute-based Time fields, usestep: 60and values with seconds set to00. -
precisioncontrols decimal entry and display. It is not a separate validation rule for values supplied by mappings or expressions. -
maxlengthsets a character limit for Text, Textarea, and HTML. It constrains editable entry, and resource-completion validation also checks preloaded text against it. Check values supplied by NetSuite defaults, mappings, and expressions. Loading a value doesn't automatically truncate it. FSM Mobile Save and completion checks differ, so successful Save alone doesn't establish that an over-length value is valid. -
patternapplies a regular expression to a non-empty text value. Userequiredseparately when the field must also be completed. The supported types areemail,password,tel,text, andurl. -
The editable Email control has its own format check. Configure
patternwhen a format must also be checked during form validation. -
A Select value contains an option's
idandlabel, or an array of these objects for multiple selection. A bare option ID is not the documented value format.
Hiding, disabling, or making an element read-only doesn't automatically remove its validation requirements. If the element requires a value, ensure that the value can be supplied without user entry.
Element validation is separate from NetSuite validation during synchronization. A value accepted in FSM Mobile can still be rejected by record permissions, required NetSuite fields, scripts, or other account rules.
A record can save successfully but its resource can remain incomplete. For example, text returned from NetSuite that exceeds the element's maxlength fails resource-completion validation. If a required resource no longer has enough valid records, its tab shows the action-required asterisk again. The element itself doesn't have to be marked required for an over-length value to fail validation.
For Time and DateTime, a record passing Save validation in FSM Mobile doesn't establish that it satisfies every configured increment rule. Keep values aligned to the intended increment and check both saving and resource completion. The Time Save check measures increments from midnight, including when min is configured.
Related Topics
- FSM Configuration Reference
- FSM Mobile Resource Properties Reference
- FSM Searches and Field Mapping
- FSM Expressions and Template Tags
- Enhanced Technician Notes
-
FSM Performance and Data Collection - performance measurement and collection of requests, responses, and relevant logs.