LogoLogo
What's NewDeveloper CommunitySupportStatus
  • 🚀Get Started
    • What is JourneyApps Platform?
    • Tutorial: Build your First App
      • 1. Introduction
      • 2. Create a new App
      • 3. OXIDE IDE Overview
      • 4. Hello World app
      • 5. The Data Model
      • 6. View Components
      • 7. Queries and Data Sync
      • 8. Simple Navigation
      • 9. View Stack
      • 10. Input Validation
      • 11. View Parameters
      • 12. Data Manipulation
      • 13. Responsive Apps
      • 14. Styling
      • 15. Lists
      • 16. GPS Capturing
      • 17. Relationships
      • 18. Multiple User Roles
      • 19. Deployment and Users
      • 20. Version Control
      • 21. CSV and APIs
      • 22. Conclusion
    • JourneyApps Platform Fundamentals
      • Creating a New App
        • Git-enabled Apps
      • What are Views?
      • What is the Data Model?
      • JourneyApps Syntax Basics
      • Access the Database (DB)
        • Manipulate DB Objects
        • Query DB Objects
      • View Navigation
        • Deep Linking
      • CloudCode Overview
      • OXIDE (Online IDE)
  • 💻Build your App
    • JourneyApps Syntax
      • Syntax Basics
      • Access the DB
      • View Navigation
      • Async & Await
      • TypeScript Apps (Beta)
        • runtime-build package
        • TypeScript App Troubleshooting
      • What's New in V4
        • Updating to the V4 API
    • Configure your Data Model
      • What is the data model?
      • Reference: model
        • field
        • belongs-to
        • has-many
        • index
      • Data Rules
        • Data Buckets
        • Sync Rules - Limit data synced to devices
        • Data ACLs - Limit access to data
        • Real-world example for Data Rules
        • ❔FAQs
        • Migrate to Data Rules
      • App Indexes
      • Webhooks
    • UI Components
      • All UI Components
        • actionSheet
        • Attachments
        • button
        • button-group
        • capture-coordinates
          • marker
          • marker-query
        • capture-file
        • capture-photo
        • capture-signature
        • card
          • accent
          • action
        • columns
          • column
        • component
        • context-menu
          • divider
          • item
        • CSV
        • date-input
        • datetime-input
        • dialog
          • body
        • display-3d-model
          • 📖display-3d-model Guides
            • Guide 1: Initialize and layout a 3D model in a view
            • Guide 2: Control playback position
            • Guide 3: Troubleshooting controls
        • display-coordinates
        • display-file
        • display-image
        • display-photo
        • display-signature
        • heading
        • html
          • HTML Advanced Topics
          • ❔HTML FAQs
          • 📖Guide: HTML & JourneyApps iFrame Client
        • icons
        • info
        • info-table
          • row
        • journey.photos (capture multiple photos)
        • JourneyPrinter (print PDFs)
        • grid
          • cell
          • 📖grid Examples
        • list
          • list-item
            • accent
            • asset
            • pills
              • pill
            • action
        • multiple-choice-checklist
        • navigation (Navigation drawer)
          • general-section
            • item
          • section
            • item
              • item
          • ❔navigation FAQs
        • notification
        • object-dropdown
        • object-list
          • action
        • object-repeat
        • object-table
          • action
          • column
            • action
            • edit-boolean
            • edit-date
            • edit-datetime
            • edit-integer
            • edit-number
            • edit-select
            • edit-text
            • edit-time
            • edit-typeahead
              • action
            • header-action
          • column-group
          • empty-action
          • 📖object-table Guides
            • Actions
            • Cell callouts
            • Column groups
            • Columns
            • Controlled object-table
            • Controls
            • Copy & paste data
            • Edit cells
            • Filters
            • Frozen columns
            • Fullscreen object-table
            • Mode
            • State
            • Styles
        • optionList
        • PhotonSync (transfer data offline)
        • power-bi
          • 📖Guide: PowerBI Embedding
        • scan-barcode
        • shortcut
        • sidebar
        • single-choice-dropdown
        • single-choice-radio
        • template
        • text-input
        • time-input
        • toggle
        • view
      • JS/TS Events
      • Show / Hide UI Components
      • View Templates
      • XML Fields (Attributes)
        • align-content
        • align-controls
        • align-label
        • bind
        • clear-button-visibility
        • control-order
        • disabled
        • error-message
        • icon-position
        • id
        • hide-if
        • modifier-text
        • label
        • label-case
        • label-color
        • on-change
        • on-press
        • placeholder
        • required
        • show-if
    • JS / TS APIs
      • Attachment
      • Bluetooth (Beta)
      • Broadcast
      • component
      • CSV
      • DB
      • HardwareBarcode
      • journey
        • journey.config
        • journey.container
        • journey.device
        • journey.diagnostics
        • journey.dialog
        • journey.files
        • journey.hardware
        • journey.photos
        • journey.runtime
        • journey.sensors
        • journey.viewStack
      • JourneyPrinter
      • KeyboardBarcode
      • LocalDB
      • NFC
      • OnlineDB
      • PhotonSync
      • SerialPort
      • ShortcutManager
      • TCPSocket
      • user
    • Extend your App with Custom Code
      • App packages
        • App packages overview
        • PDF report package
        • TypeScript library & unit tests
        • Manage External Dependencies
      • Custom HTML
    • Style & Customize your App
      • Style & configure UI components
        • Overview
        • Understand extendable themes
        • Use themes on a view
        • Theme specific components on a view
        • Examples
        • Debugging
        • ❔FAQs
      • Change your App Font
      • Custom Branding
        • Custom Container Features
        • Special Requirements for iOS Containers
    • Integrate your App
      • Backend integrations with CloudCode
      • Barcode Scanning
        • Barcode Scanning using Keyboard Emulation
        • Hardware Barcode Scanning
        • scan-barcode
      • Bluetooth Low Energy (BLE)
      • Broadcast API
      • HTTP requests (Fetch API)
      • JourneyApps Print (Android)
      • Maps and navigation
      • NFC
      • Opening external links/apps
      • Serial Port
      • TCP Sockets
    • Design Intuitive Apps
      • UX Guidelines
      • Write Effective Copy
  • 📱App Features
    • RealWear® Voice Control
      • Automatic Voice Commands
        • Automatic Voice Commands - Advanced
      • Manual Voice Commands
    • App, Runtime and Container Updates
    • Batch Operations (App)
    • Call JS/TS Functions from XML
    • Capture GPS Locations
    • Push Notifications
    • Translations
    • XML Format Strings
    • Webhooks (External)
  • 🌐CloudCode
    • CloudCode Overview
    • Trigger a CloudCode Task
      • Trigger CC with a Schedule
      • Trigger CC via a Webhook
      • Trigger CC from an App
      • Trigger CC from Another Task
      • Trigger CC via HTTP
    • Attachments in CloudCode
    • Timezones
    • Advanced CloudCode Topics
      • Access Multiple DBs in CloudCode Tasks
      • Batch API (CloudCode)
      • CloudCode Dependencies
      • Configure HTTPS in CloudCode
      • Deployment environment variables
      • Local CloudCode Development
      • PDF Reports using CloudCode
      • Shared CloudCode Tasks
      • Translations in CloudCode
  • 📥Backend API
    • Introduction
    • API Reference
      • Retrieve All Objects
      • Query Objects
      • Sort Results
      • Limit and Skip
      • Count Objects
      • Create a New Object
      • Retrieve a Single Object
      • Update a Single Object
      • Delete a Single Object
      • Batch Operations (v4 API)
      • Oplog API
      • Retrieve the App Data Model
      • Manage App Users and Sessions
      • Field Representation
      • Error Responses
    • API Limits
    • Update to the V4 API
  • ⚙️Technical
    • Data Synchronization Priority
    • Device Diagnostics
    • JSON1 Query Engine
    • Improve App Performance
    • Security Measures
    • Supported Platforms
      • Web Container
      • Windows Installer
    • Domain Whitelist
  • 🖥️OXIDE
    • Get started with OXIDE
      • OXIDE Overview
      • Components of OXIDE
    • Configure Testing Deployments
    • Edit and Manage Files
      • How to Navigate to a Function
      • Manage External Dependencies
    • Create and Manage App Containers
    • Debugging & Troubleshooting
      • Common Troubleshooting Pointers
      • App Diagnostics Reports
      • Build Logs
    • OXIDE Workspaces
      • OXIDE Trees
  • ❕Deprecated Features
    • Deprecated Features and Components
Powered by GitBook
On this page
  • Nested Tags
  • Field Types
  • Integer: integer
  • Floating point value: number
  • Text values: text
  • Date: date
  • Date and time: datetime
  • GPS location: location
  • Single choice with text key: single-choice
  • Single choice with integer key: single-choice-integer
  • Boolean: boolean
  • Multiple choice with text key: multiple-choice
  • Multiple choice with integer key: multiple-choice-integer
  • Photo: photo
  • Signature: signature
  • GPS track: track
  • File attachment: attachment
  • Text Subtypes
  1. Build your App
  2. Configure your Data Model
  3. Reference: model

field

The following options can be specified for a field tag:

Name
Required
Details

name

required

Identifier for this field, unique per model. Used anywhere that code needs to reference the object.

label

required

Human-readable label for this field. Used wherever it is displayed to a user.

type

required

The type of this field. See the section below for the possible types.

Nested Tags

The following can be placed inside a field tag:

Nested Element
Details

option

Applicable to choice types. Specifies a single option key and label.

Field Types

Fields in your Data Model and variables in your Views are set up to store a specific kind of data — which can be any of the following:

Integer: integer

Can accurately represent numbers between -231 and 231-1 (-2 147 483 648 and 2 147 483 647).

Example: 100

Floating point value: number

Uses JavaScript's implementation of IEEE 754 and therefore supports MAX/MIN values of Number.MAX_VALUE => 1.7976931348623157e+308 Number.MIN_VALUE => 5e-324

Example: 3.14

Text values: text

Text value - anything from a short name to longer paragraphs. Some subtypes are defined for text values, which affect the input method shown to the user on a mobile device, and may provide additional validations. Please refer to the Text Subtypes section below.

Example: "John Doe"

Date: date

Represents a date in the Gregorian calendar, for example "2016/10/27". Not tied to any timezone.

Example: 2016/10/27

Date and time: datetime

Represents a specific date & time combination. Time is always displayed in the local timezone. For example, "2016/10/27 12:15:48" in UTC will be displayed as "2016/10/27 14:15:48" on a device configured for GMT+2.

Example: 2016/10/27 12:15:48

GPS location: location

Represents a set of GPS coordinates. This includes:

  • latitude

  • longitude

  • altitude

  • horizontal_accuracy

  • vertical_accuracy

  • timestamp

Limitation

Capturing the altitude and/or vertical_accuracy is not supported on several platforms / devices, including Android devices. These devices will return undefined or null for these fields.

Example:

{
    "latitude": -25.92593042155752,
    "longitude": 28.15002065192829,
    "altitude": 1570.0,
    "horizontal_accuracy": 10.0,
    "vertical_accuracy": null,
    "timestamp": "2013-10-17T07:25:21Z"
}

Single choice with text key: single-choice

Represents a single choice from a list of options, for example "gender" or "province". Options are specified as a list of string key and label pairs.

  • When accessed from JavaScript/TypeScript, the key is used.

  • When displaying the value to a user, the human-readable label is used.

Example options:

<option key="male">Male</option>
<option key="female">Female</option>

For the example, if the "Female" option was selected, the value when accessed from your JavaScript/TypeScript code would be "female".

Single choice with integer key: single-choice-integer

Represents a single choice from a list of options, for example "gender" or "province". Options are specified as a list of integer key and label pairs.

  • When accessed from JavaScript/TypeScript, the integer key is used.

  • When displaying the value to a user, the human-readable label is used.

  • If the keys are not explicitly defined, they start counting from 0 and increment by one for each option.

Example options:

<option key="0">Male</option>
<option key="1">Female</option>

For the example, if the "Female" option was selected, the value when accessed from your JavaScript/TypeScript code would be: 1.

Boolean: boolean

Represents a single choice from two boolean options, for example "Checked" or "Not Checked". Options are specified as two list of boolean key and label pairs, defaulting to "Yes" (true) and "No" (false).

  • When accessed from JavaScript/TypeScript, the boolean key is used.

  • When displaying the value to a user, the human-readable label is used.

Example options:

<option key="true">Checked</option>
<option key="false">Not Checked</option>

For the example, if the "Not Checked" option was selected, the value when accessed from your JavaScript/TypeScript code would be: false.

Multiple choice with text key: multiple-choice

Same as a single-choice field, but multiple values may be selected.

  • When you access a multiple-choice value from JavaScript/TypeScript, the value will be an array of keys of all the selected options.

Example options:

<option key="checked-oil">Checked oil</option>
<option key="checked-tyre-pressure">Checked type pressure</option>
<option key="checked-water-fluid">Checked washer fluid</option>

For the example, if the first two options were selected, the value when accessed from your JavaScript/TypeScript code would be: ["checked-oil", "checked-tyre-pressure"]

Multiple choice with integer key: multiple-choice-integer

Same as the single-choice-integer field, but multiple values may be selected.

  • When you access a multiple-choice-integer value from JavaScript/TypeScript, the value will be an array of integer keys of all the selected options.

Example options:

<option key="0">Checked oil</option>
<option key="1">Checked type pressure</option>
<option key="2">Checked washer fluid</option>
<option key="0">Checked oil</option>
<option key="1">Checked type pressure</option>
<option key="2">Checked washer fluid</option>

For the example, if the first two options were selected, the value when accessed from your JavaScript/TypeScript code would be: [0, 1]

Photo: photo

Represents a photo file, captured as a JPEG image by the mobile application.

Signature: signature

Represents a signature file, captured as a 400x200px SVG file by the mobile application.

GPS track: track

Represents a recorded GPS tracking session. Data can be displayed on a map in the App Backend or exported to GeoJSON, GPX or KML.

File attachment: attachment

Variable for capturing files. Must include a media attribute with one of the following types:

  • any

  • image/jpeg

  • image/png

  • image/svg+xml

  • application/pdf

  • application/vnd.openxmlformats-officedocument.presentationml.presentation

  • application/vnd.openxmlformats-officedocument.spreadsheetml.sheet

  • application/vnd.openxmlformats-officedocument.wordprocessingml.document

  • application/vnd.ms-excel

  • application/vnd.valvelink (Maps to .exp files. Introduced in JourneyApps Runtime version 4.90.0)

  • application/msword

  • text/plain

  • text/csv

  • application/xml

  • application/vnd.anritsu

For example:

  <var name="file" type="attachment" media="any" />

Text Subtypes

As discussed above, some subtypes are defined for text types, which affect the input method shown to the user on a mobile device, and may provide additional validations.

To use one of these subtypes, add :subtype to a text field definition, for example:

<field name="first_name" label="First Name" type="text:name" />
Subtype
Details
Additional validation?

(none)

The default - any characters are allowed.

No

text:email

Email address.

Yes. Validates whether the entered value is a valid email address.

text:address

Street address, suburb or city. Words are automatically capitalized.

No

text:name

Person or other name. Words are automatically capitalized.

No

text:url

Web URL.

No

text:paragraph

A multi-line block of text. Renders as a paragraph rather than as a single line.

No

text:number

Only digits are allowed.

No

text:signed-number

Digits are allowed, as well as a negative sign.

Yes. Validates whether the entered value is a valid signed number.

text:phone-number

Represents a phone number. Only digits are allowed.

Yes. Validates whether the entered value is a valid phone number.

text:decimal-number

Digits are allowed, as well as a decimal point and negative sign.

No

text:password

Characters are hidden when entered.

No

PreviousReference: modelNextbelongs-to

Last updated 7 months ago

💻