User Manual

GETTING STARTED


OTHER EDITIONS


LAUNCHERS


MODULES


PLATFORM


APPENDIX


TUTORIALS & HELPFUL TRICKS


STRATEGIC PARTNER LINKS

Sepasoft - MES Modules
Cirrus Link - MQTT Modules

RESOURCES

Inductive University
Ignition Demo Project
Knowledge Base Articles
Forum
IA Support

ALL USER MANUAL VERSIONS

Ignition 8.1. Offline Version (04/2021)
Ignition 8 Online Version
Ignition 7.9 Online Version
Ignition 7.8 Online Version

Deprecated Pages

SDK Documentation

Employees

Sign In

Skip to end of metadata
Go to start of metadata

This function is used by Ignition's Expression language.

Description

Tries to coerce value into a long (64-bit integer). If value is a number, the conversion is direct. If value is a string, it is parsed to see if it represents a long. If not, type casting fails. Will round if appropriate.

Syntax

toLong(value, [failover])

  • Parameters

object value - The value to type cast.

object failover - The failover value if type casting fails. [optional]

  • Results

Long - The value type cast as a long.

Examples
Code Snippet
toLong("38") //Returns 38.
Code Snippet
toLong("33.9") //Returns 34.
Code Snippet
toLong({Root Container.Text Field.text}, -1) //Returns the value in the text box as an long, or -1 if the value doesn't represent an number.
  • No labels