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 value takes 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.

  • null is 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 from null. Use it only where an empty string is an accepted value or default.

  • Boolean values are the lowercase, unquoted JSON literals true and false. 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. undefined is not a JSON configuration value.

  • parent creates a parent-child relationship between a table element 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 parent to 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 receives maxlength: 4000 and rows: 6. Long Text receives maxlength: 1000000 and rows: 12. These are FSM translation defaults. The form loader doesn't read NetSuite field restrictions for min, max, maxlength, or pattern.

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.

Important:

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

checkbox

A box with a true or false value.

Boolean

true, false

false

date

A calendar date.

String (YYYY-MM-DD)

A valid canonical date, "", null, or a date string that NetSuite can parse using the current user's date format. Non-canonical static values are normalized to YYYY-MM-DD.

Current date. To leave the value blank on a new record, set "value": "".

datetime

A date and time.

String (YYYY-MM-DD HH:mm:ss)

A valid canonical date and time, "", null, or a date-time string that NetSuite can parse using the current user's date and time format. Non-canonical static values are normalized to YYYY-MM-DD HH:mm:ss.

Current date and time. To leave the value blank on a new record, set "value": "".

email

A single-line email address field with a basic input-format check.

String

Text. The editable input flags values that don't match ^[^@]+@[^@]+\.[^@]+$. Configure pattern when the format must be enforced by article validation.

""

file

A file upload and download field.

File object

A file object supplied by the FSM Mobile upload flow, or null.

null

heading

A display-only section heading. Its text is supplied by label, not value.

None

Not applicable.

Not applicable.

html

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.

""

image

An image capture or upload field.

Image/file object

An image object supplied by the FSM Mobile upload or camera flow, or null.

null

number

A numeric field, optionally formatted with a unit.

Number

Any numeric value. Use min and max to set the lowest and highest allowed values. Use step to require a fixed increment, such as 0.25. Use precision to set how many decimal places you can enter and see.

null

password

A masked single-line text field.

String

Any text. Apply pattern to constrain it.

""

select

A list from which a user selects one or more options.

Object, or array of objects

For single selection, one { id, label } option object or null. For multiple selection, an array of option objects, including [].

null, [] for multi-select, or selected or automatically selected options

signature

A signature capture field.

String

A signature value supplied by the FSM Mobile signature capture flow.

""

table

A repeating row container and the only supported parent element type. Define its direct child column elements with parent set to this table's name.

Array of objects

An array of row objects whose keys are the names of the table's column elements.

[]

tel

A single-line telephone field.

String

Any text. Apply pattern to constrain it.

""

text

A single-line text field.

String

Any text. Apply maxlength and pattern to constrain it.

""

textarea

A multiline plain-text field.

String

Any text. Apply maxlength to constrain it.

""

time

A time of day.

String (HH:mm:ss)

A valid canonical time, "", null, or a time string that NetSuite can parse using the current user's time format. Non-canonical static values are normalized to HH:mm:ss.

""

url

A web-link field. text can supply the read-only link text.

String

Any text. Apply pattern to constrain it.

""

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

integer

number

"precision": 0

float

number

"precision": 8

currency

number

"precision": 2, "unit": "usd"

percent

number

"precision": 4, "unit": "percent", "map": "formulanumeric:{fieldId}*100|fieldId[float]". It reads the stored fraction as a percentage value and writes through as a float.

help

textarea

"map": "|", "readonly": true

longtext

textarea

"maxlength": 1000000, "rows": 12

inlinehtml

html

"map": "|", "readonly": true

richtext

signature or html

A field ID that matches the signature naming pattern becomes signature. Otherwise it becomes html with "maxlength": 1000000 and "rows": 12.

multiselect

select

"multiple": true

phone

tel

No additional properties.

document

file

No additional properties.

datetimetz

datetime

Uses the datetime default "step": 1.

timeofday

time

Uses the time default "step": 60.

datalist

text

Deprecated compatibility type. It is hidden and uses "map": "|". Don't use it for new configuration.

Unsupported type, for example hidden

text

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

type

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.

name

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 element object.

parent

Identifies the parent table that owns this column element.

String

The name of a top-level table element. The named parent must be "type": "table". Omit this property for top-level elements.

No (structural property)

Omitted (top-level element)

value

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

Label shown with the element.

String

Any display text.

Yes (String result).

""

required

Requires a non-empty accepted value before the form can be completed.

Boolean

true, false

Yes (Boolean result).

false

disabled

Displays the element but prevents user input.

Boolean

true, false

Yes (Boolean result).

false

hidden

Doesn't display the element.

Boolean

true, false

Yes (Boolean result).

false

readonly

Displays the value without allowing edits.

Boolean

true, false

Yes (Boolean result).

false

class

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

accept

Sets the file-type filter shown by the browser file picker.

file, image

Comma-separated file extensions or MIME-type specifiers. Configure, for example, "accept": ".pdf,.docx" or "accept": ".jpg,.jpeg,.png".

Expressions: Yes (String result).

file: omitted, so no picker filter. image: .bmp,.gif,.jpg,.jpeg,.pjpg,.pjpeg,.png,.tiff,.tif

autoselect

Selects the only option automatically when no option is marked selected. Applies only to single-select lists.

select

true, false

Expressions: Yes (Boolean result).

Set explicitly. See Select Defaults and Stored Values.

barcode

Enables device barcode scanning where the device or browser can provide camera access.

select, text

true, false

Expressions: Yes (Boolean result).

false

camera

Enables image capture from the device camera.

image

true, false

Expressions: Yes (Boolean result).

false

column

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 table elements

A numeric position, such as 1 or 2. null doesn't reliably exclude a column.

Expressions: No (list structure)

FSM can assign columns to the first visible elements when fewer than two have been configured.

cols

Sets the visible text width.

html, textarea

Positive integer.

Expressions: Yes (positive integer result).

null

downsample

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.

file, image

Positive whole-number pixel value, for example 1080.

Expressions: Yes (positive integer result).

Resource imagesize value. Standard mobile default is 1080 pixels.

height

Sets the signature input height.

signature

Positive pixel value.

Expressions: Yes (positive integer result).

148 pixels

level

Sets the heading level.

heading

1, 2, 3

Expressions: Yes (integer result from 1 through 3).

1

max

Sets the maximum permitted numeric, date, or time value. It doesn't set a text character limit. Use maxlength for that purpose.

date, datetime, number, time

Number for number, otherwise the canonical value format for that type.

Expressions: Yes (result must match the element type).

null (no maximum), unless supplied by configuration. Form loading doesn't read a NetSuite field's maximum restriction.

maxlength

Sets the maximum character count for editable text entry.

html, text, textarea

Positive integer.

Expressions: Yes (positive integer result).

text: 300, textarea: 4000, html: no configured limit. Generated form fields and aliases can supply different values.

maxsize

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.

file, image

Positive whole-number KB value.

Expressions: Yes (positive integer result).

10240 KB (10 MB). The Image input doesn't apply this value.

min

Sets the minimum permitted numeric, date, or time value.

date, datetime, number, time

Number for number, otherwise the canonical value format for that type.

Expressions: Yes (result must match the element type).

null (no minimum), unless supplied by configuration. Form loading doesn't read a NetSuite field's minimum restriction.

multiple

Allows more than one option to be selected. The selected value must match the resulting selection mode.

select

true, false

Expressions: Yes (Boolean result).

false

options

Defines the options that a Select element presents. Hidden shared-list elements can also supply options to other elements.

select, hidden shared-list elements described in Shared Option Lists and URI References

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).

[] for a Select input.

pattern

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.

email, password, tel, text, url

Valid regular-expression source string.

Expressions: Yes (valid regular-expression String result).

"" (no configured pattern validation)

placeholder

Displays hint text when the field has no value.

email, html, password, select, tel, text, textarea, url

String.

Expressions: Yes (String result).

""

precision

Sets the maximum decimal places in the editable control and display when no unit precision or step display precision applies.

number

Whole number from 0 through 8.

Expressions: Yes (whole-number result from 0 through 8).

8

remote

Loads Select options from the server on demand. Requires a connection and an option source configured for the request. With search: true, the option source can use the entered search text. This is separate from resource-level remote.

select

true, false

Expressions: Yes (Boolean result).

false

rows

Sets the visible text height.

html, textarea

Positive integer.

Expressions: Yes (positive integer result).

textarea: 6, html: 3. Generated form fields and aliases can supply different values.

search

Enables search within this element's Select list. This is separate from resource-level search on the Resource Index.

select

true, false

Expressions: Yes (Boolean result).

false

step

Sets the permitted increment.

date, datetime, number, time

Positive number for number, positive whole number for date and time values. Date uses days. Datetime and time use seconds.

Expressions: Yes (result must meet the type-specific increment rule).

null for date and number, 1 for datetime, 60 for time

stepper

Shows numeric increment and decrement controls.

number

true, false

Expressions: Yes (Boolean result).

false

text

Provides display text for a read-only URL. The URL remains the value.

url

String.

Expressions: Yes (String result).

""

unit

Selects the unit used for number display formatting.

number

Unit identifier string.

Expressions: Yes (String result).

""

width

Sets the signature input width.

signature

Positive pixel value.

Expressions: Yes (positive integer result).

448 pixels

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

index

Inserts the element at a position in the resource's element order. Use 0 for the first position. It doesn't set the Resource Index column order.

Non-negative whole number.

Element definition order.

title

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.

true or false.

No configured title element.

map

Supplies this element's field mapping when the resource uses automap and its article map doesn't already contain an entry for the element.

A valid field mapping for the element's data shape.

A mapping derived from the element name and type when automatic mapping is enabled.

uri

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 services.

Not registered for cross-resource references unless configured.

textenhance

Selects the Text Enhance prompt for an editable textarea element when Enhanced Technician Notes is enabled.

Prompt internal ID as a string. "" disables enhancement for this element.

The configured cleanup prompt when the feature is enabled, "" otherwise.

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 accept Behavior

file

No filter.

Applies the configured filter.

image

.bmp,.gif,.jpg,.jpeg,.pjpg,.pjpeg,.png,.tiff,.tif

Replaces the default filter for existing-file selection. With camera: true, the camera selection path uses image/*.

Important:

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

checkbox

C

None

No additional properties. A form can supply a checked or unchecked initial value.

date

C

min, max, step

min: null, max: null, step: null. A form can supply its initial date instead of the current-date fallback.

datetime

C

min, max, step

min: null, max: null, step: 1 second. A form can supply its initial date-time instead of the current-date-time fallback.

email

C

pattern, placeholder

pattern: "", placeholder: "".

file

C

accept, downsample, maxsize

accept omitted. downsample uses imagesize, normally 1080. The File input uses maxsize: 10240 KB for non-bitmap files.

heading

Subset supported, as listed in the next column.

type, name, parent, label, level, hidden

level: 1, label: "", hidden: false. name comes from the definition. parent omitted. No initial value.

html

C

rows, cols, maxlength, placeholder

rows: 3, cols: null, no configured maxlength, placeholder: "". A Rich Text field translated to HTML receives maxlength: 1000000, rows: 12. Inline HTML is read-only and receives map: "|".

image

C

accept, camera, downsample, maxsize

The default accept filter is listed in File and Image accept Behavior. camera: false. downsample uses imagesize, normally 1080. Image input doesn't apply maxsize.

number

C

min, max, precision, step, stepper, unit

min: null, max: null, precision: 8, step: null, stepper: false, unit: "". Form translation gives Integer precision: 0, Currency precision: 2 and unit: "usd", Float precision: 8, and Percent precision: 4 and unit: "percent".

password

C

pattern, placeholder

pattern: "", placeholder: "". Form translation supplies map: "|".

select

C

multiple, autoselect, barcode, options, placeholder, remote, search

multiple: false, barcode: false, options: [], placeholder: "", remote: false, search: false. Set autoselect explicitly. A form can supply options and an initial selection. A Multi-Select field receives multiple: true.

signature

C

width, height

width: 448, height: 148 pixels.

table

C

No additional properties. It is the only supported parent element type, and direct child elements use its name in parent.

No additional property defaults. Configure each child's limits separately.

tel

C

pattern, placeholder

pattern: "", placeholder: "".

text

C

barcode, maxlength, pattern, placeholder

barcode: false, maxlength: 300, pattern: "", placeholder: "". A form-loaded Text field receives this character limit even if custom JSON omits it. Its initial value can still be longer.

textarea

C

maxlength, rows, cols, placeholder

maxlength: 4000, rows: 6, cols: null, placeholder: "". Long Text receives maxlength: 1000000, rows: 12. A form-loaded Help field becomes a read-only Textarea with these ordinary Textarea limits and map: "|". A manually configured help compatibility type instead uses rows: 3 and has no generated maxlength.

time

C

min, max, step

min: null, max: null, step: 60 seconds. A form can supply an initial time.

url

C

pattern, placeholder, text

pattern: "", placeholder: "", text: "".

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

id

Yes

String

Identifies the option. Retained in the selected value.

label

Yes

String

Displayed option text. Retained in the selected value.

selected

No

true, false

Supplies a default selection when the element has no explicit value. Mark one option for a single-select element. Multiple options can be marked for a multi-select element.

optgroup

No

String

Groups options under a displayed heading.

disabled

No

true, false

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 altname.

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

"precision": 0, "step": 1, optionally "stepper": true. Set min and max where the range is known.

Limits entry and display to whole numbers.

Decimal measurements

Set precision to the required displayed decimal places and step to the smallest permitted increment, such as 0.25.

Supports decimal entry and enforces the increment.

Currency

Set unit to a configured currency unit, such as usd. Use the unit definition's prefix or suffix and precision, commonly 2. Use a matching step, commonly 0.01.

Formats the value using the unit definition, for example a $ prefix and two decimal places.

Percentage

Set unit to a configured percentage unit, such as percent. Use precision and step appropriate for the accepted percentage value.

Adds the configured percent suffix. The unit formats the stored number directly. For example, 0.8554 is not automatically converted to 85.54%. Configure the appropriate field mapping when NetSuite stores a fraction.

Data size

Set unit to a unit definition with multiple, for example byte with "multiple": 1024, a B suffix, and precision 0.

Read-only rendering scales values through K, M, and G prefixes as appropriate.

Other measurements

Set unit to another configured unit identifier, such as a temperature unit, and define its suffix, prefix, and precision.

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

value

Number. Numeric strings are also coerced during resource normalization.

null

The numeric value stored by the element. For new configuration, use a JSON number literal, such as 1.25, rather than a numeric string such as "1.25".

min / max

Number or null.

null

Defines inclusive validation limits.

precision

Whole number from 0 through 8.

8

Limits the number of decimal places that a user can enter and that FSM Mobile displays when neither a unit precision nor step display precision applies. 0 prevents decimal entry. It doesn't add a stored-value validation rule. A unit precision takes precedence.

step

Positive number or null.

null

The permitted increment used for validation and numeric stepping. When no unit precision applies, a whole-number step displays zero decimal places and a fractional step displays the number of decimal places in that step. Use 1 for whole numbers, 0.01 for cents, and 0.25 for quarter-unit increments.

stepper

Boolean.

false

Shows increment and decrement controls. It works with step. It doesn't change numeric validation by itself.

unit

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 min, max, step, stepper, or value. An unrecognized identifier displays the number without unit formatting.

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

prefix

String

Added before the displayed number.

suffix

String

Added after the displayed number.

precision

Use a whole number from 0 through 8, consistent with the Number element's precision property.

Overrides the element's precision and step-derived precision for the editable control and display.

multiple

Use a positive numeric factor greater than 1, such as 1024 for bytes.

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 &deg;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.

  • required checks for a non-empty value. For a required table, at least one row is needed. Each row's child elements have their own rules.

  • min and max set inclusive limits for numbers, dates, times, and date-times.

  • A Number step requires a multiple of that increment, measured from zero. For example, with step: 0.25, 1.25 is valid and 1.30 is not. Setting min doesn't shift the numeric increment base.

  • A Date step uses the configured min as its base, or 1970-01-01 when min is omitted. Dates use days. Times and date-times use seconds. For minute-based Time fields, use step: 60 and values with seconds set to 00.

  • precision controls decimal entry and display. It is not a separate validation rule for values supplied by mappings or expressions.

  • maxlength sets 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.

  • pattern applies a regular expression to a non-empty text value. Use required separately when the field must also be completed. The supported types are email, password, tel, text, and url.

  • The editable Email control has its own format check. Configure pattern when a format must also be checked during form validation.

  • A Select value contains an option's id and label, or an array of these objects for multiple selection. A bare option ID is not the documented value format.

Important:

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.

Note:

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.

Important:

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

General Notices