Flow Connect Help
Roadmap
  • ℹ️This is Flow Connect
    • Overview
    • Technical overview
      • System requirements
    • What's new?
      • Change log
  • ▶️quick start
    • Create an application
    • Create an admin access group
  • 🔁working with Connect
    • Connect to systems
      • Connector agents
        • Add agent group
        • Install agent manager
        • Add agent
        • Manage agent
      • Connectors
        • IFS Applications 10
        • Oracle
        • Microsoft SQL Server
        • Send Email
        • REST
          • Microsoft Graph API
          • Infor M3 REST
            • Obtaining Infor ION API file
            • Configure REST Connector with ION API file
          • IFS Cloud
            • IAM Client Registration
            • Obtaining end-point info from IFS Cloud
            • Configure REST Connector for IFS Cloud
        • File System
      • Redirect URIs
    • Create and design
      • Application packages
      • Applications
        • Create
        • Design
        • Test
        • Commit
      • Portal Pages
        • Create Portal Page
        • Design Portal Page
        • Commit Portal Page
      • Components
        • Create component
        • Manage component
      • Modules
        • Create module
        • Manage module
      • Automations
        • Functionality
        • Create Automation
        • Manage Automation
        • Creating Access Key
        • Executing Automations Externally
          • IFS Cloud
          • Salesforce Apex Trigger Example
    • Deploy
      • Environments
      • Deploy
    • Use
      • On mobile devices
      • In web browser - Web client
      • In web browser - Portal
    • Share
      • Share Applications
    • User administration
      • Users
        • Invite a new user
        • Manage users
      • User groups
        • Create user groups
        • Manage user groups
      • Access
        • Manage access
  • ⏸️Reference
    • How-to guides
      • Create User Step controls
        • Header
        • Static text
        • Labelled static text
        • Link
        • Image viewer
        • Text input
        • Numeric input
        • Date input
        • Time input
        • Check box input
        • Binary option input
        • List selection input
        • List multi-selection input
        • Menu selection input
        • Data grid
        • Calendar control
        • Image selection input
        • List presentation
        • Camera Input
      • Dependent controls in User step
        • Variable source
        • Expression source
        • Control visibility (condition to hide)
      • Configure SSO for Microsoft Entra
    • Reference
      • Clients
        • Settings
        • My data
      • Designer
        • Controls
          • Header
          • Static text
          • Labeled static text
          • Link
          • External app launcher
          • Image viewer
          • Text input
          • Numeric input
          • Date input
          • Time input
          • Check box input
          • Binary option input
          • List selection input
          • List multi-selection input
          • Menu selection input
          • Data grid
          • Calendar
          • Image selection input
          • List presentation
          • Camera input
          • File gallery
          • GPS location input
          • Signature capture input
          • Item creation sub task
          • Check list sub task
          • Verb sub task
        • Steps
          • Start
          • User interaction
          • External system
          • Decision
          • Assertion
          • HTTP requests
          • Assignment
          • Table
          • Event listener
          • Checkpoint
          • Script
          • Annotation
          • End
          • Local data resource
      • Portal
        • Design items
          • Portlets
            • Accumulation chart
            • Base chart
            • Circular gauge
            • Custom content
            • Data tree
            • Document viewer
            • Filter
            • Kanban
            • KPI card
            • Link
            • My apps
            • Record
            • Rich text
            • Table
          • Container
          • Common portlet configuration
            • General
            • Events
            • Data
            • Custom buttons
            • Style
        • Portal settings
          • Branding
          • Page
          • Navigation
        • Profile
        • Portlet actions
        • Cache
        • Input to Start Step
      • Diagnostic mode
      • FlowScript
        • Walkthrough
          • Introduction
          • Expressions and programs
          • Anatomy of a program
          • Variables
          • Simple types
          • Nullable types
          • Records
          • Sequences
          • Other types
          • Arithmetic
          • Other expressions
          • Queries
          • Conditionals and loops
          • Function definitions
          • Built-in functions
          • DateTime module
          • Seq module
          • HTTP module
          • CSV module
          • JSON module
          • Trace module
          • Record module
          • XML Module
          • Filesystem Module
          • Custom modules
          • Custom Types
          • Appendix: Subtyping rules
          • Appendix: Escape sequences
          • Appendix: Type checking errors
      • Flowscript Copilot
      • Glossary
    • Flow Connect Downloads
      • Install Flow Connect Designer
    • Migrate from Flow Classic
      • Portal - migrate from Flow Classic
      • Classic vs. Connect Comparison Guide
Powered by GitBook
On this page
  • number
  • text
  • boolean
  • datetime
  • binary
  • primitive

Was this helpful?

  1. Reference
  2. Reference
  3. FlowScript
  4. Walkthrough

Simple types

PreviousVariablesNextNullable types

Last updated 3 months ago

Was this helpful?

The type of a variable delineates the set of values it can hold. In this document, you will learn about the different simple types a Flow variable can have.

number

The number type can hold hold numeric values, including both integers and floating-point. Number values are written in decimal representation, using the point character to separate the integer and fractional parts.

// Example: Create three variables of type number
let x = 1 + 2;
let y = 0.5;
let z = -1;
Advanced: Representation of numbers

Under the hood, numbers are represented in 128-bit decimal floating-point format as defined in . This gives them a relatively high accuracy, a range of approximately ±1.0 × 10⁻²⁸ to ±7.9228 × 10²⁸, and a precision of 28-29 digits.

text

The text type, known as "string" or "varchar" in other languages, can hold variable-length sequences of Unicode characters. Literal text values can be written using either single or double quote characters.

A text literal that begins with a double quote may contain single quote characters. The converse is also true.

// Example: Declare two variables of type text
let country = "Netherlands";
let city = 'Rotterdam';

A literal surrounded by the backquote (`) character is known as a template literal. In a template literal, expressions can be inserted within curly braces.

// Example: A template literal

let country = "Japan";

return `The name of the country is {country}.`;
// returns "The name of the country is Japan."

Template literals, unlike single and double quoted literals, may also contain line breaks.

Advanced: Special characters in literals
Advanced: Verbatim literals

When working with Regular expressions, it often useful not to have FlowScript interpret backslashes as escape sequences. In those cases, you can prefix the literal by the @ sign, creating a verbatim literal.

// The @ character creates a verbatim literal
// where backslashes are not interpreted as escape sequences.
let pattern = @"\w+"; 

boolean

The boolean type represents a truth value. A variable of type boolean can only be assigned the values true or false.

// Example: Declare two variables of type boolean
let x = true;
let y = false;

datetime

// Example: Declare a variable of type datetime
let currentDateAndTime = now();

binary

primitive

A value with the primitive type may be either number, text, boolean, datetime, binary or null. Type checking is relaxed for such values: you can freely use a value of type primitive in any situation where a number, text, boolean, etc. is called for. However, the actual value must be compatible with the requested type, or the application will fail at runtime.

// Example: create a function which calculates the square of a number.
// Then, pass two values of type primitive into it. The second call will fail.

function square(x: number) => x * x;

let x: primitive = "1";
let y: primitive = "this is definitely not a number";

// ERROR: This will fail because "y" cannot be converted to a number.
return square(x) + square(y);

Some characters such as line feeds and backspaces must be inserted into the literal by means of an escape sequence. An escape sequence is formed by a backslash character followed by one or many escape sequence characters. For example, if you want to specify a text literal representing several lines of text, the escape sequence \n can be used to insert a line feed character: "first line\nsecond line". Similarly, the double quote character can be inserted into a double quote-delineated text literal by means of the \" escape sequence. For a full list of supported escape sequences, refer to the .

Boolean values are often used in conjunction with .

The datetime type represents a calendar date and time of day. Unlike numbers, texts and booleans, datetime values have no special literal syntax. Instead, you typically receive them from a Date input, or work with them programmatically using the function, the function or any of the functions in the .

The binary type represents unintepreted variable-length binary data such as an image, an encoded block of text or a PDF document. Binary variables typically orignate from a File gallery or the . There is no literal syntax for binary values.

⏸️
IEEE 754-2008
Appendix on escape sequences
HTTP module
DateTime module
now
date
boolean operators