About Data Types
  • 17 Aug 2023
  • 2 Minutes to read
  • Dark
    Light

About Data Types

  • Dark
    Light

Article Summary

Overview

A Data Type is a classification of data that instructs the platform how to handle the data and how it may be utilized. 

Every variable has a Data Type. By default, Decisions defines a set of built-in Alphanumeric Types and Composite Types that represent a wide variety of logical constructs. 

The Data Type may be simple, such as Int32 (a 32-bit integer value) or Boolean (True or False value), or it may be a Composite Type such as a User Account or Database Structure. Simple Types have only one value, whereas Composite Types are structures that may have many values.

When working with data in the Flow Designer, always consider the Data Type. For example, a String (text) Data Type would not work for a math function for this function expects an integer value.

The following information that may be stored in a Data Type:

  • The storage space that a variable of the type requires.
  • The maximum and minimum values that it can represent.
  • The members (methods, fields, events, and so on) that it contains.
  • The base type it inherits from.
  • The location where the memory for variables will be allocated at run time.
  • The kinds of operations that are permitted.


Most Common Data Types in Decisions

For math calculations, use Integral and Floating-Point Types as follows:

Integral Types

TypeRangeSize
SByte-128 to 127Signed 8-bit integer
Byte0 to 255Unsigned 8-bit integer
CharU+0000 to U+ffffUnicode 16-bit character
Int16-32,768 to 32,767Signed 16-bit integer
Int32-2,147,483,648 to 2,147,483,647Signed 32-bit integer
Int64-9,223,372,036,854,775,808 to 9,223,372,036,854,775,807Signed 64-bit integer
UInt640 to 18,446,744,073,709,551,615Unsigned 64-bit integer

Floating Point Types

TypeApproximate RangePrecision
Single±1.5e−45 to ±3.4e387 digits
Double±5.0e−324 to ±1.7e30815-16 digits
Decimal(-7.9 x 1028to 7.9 x 1028) / (100 to 28)28-29 digits

Single and Double are Floating Binary Point Types to represent a number like this: 10001.10010110011. The binary number and the location of the binary point are both encoded within the value. Floating Binary Point Types are much faster to work with than decimals.

For values that are either imprecise or immense (such as with artifacts of nature or that which cannot be precisely measured), Float/Double Data Types are more appropriate. Scientific data is often represented in this form.

Decimal is a floating decimal point type to represent a number like this: 12345.65789. The number and the location of the decimal point are both encoded within the value – which keeps the Decimal as a Floating-Point Type instead of a Fixed-Point Type. For non-repeating decimal fractions and whole numbers, the most common Data Type is Decimal. This is usually suitable for any concepts invented by humans, such as financial values or product ratings.

With these Data Types, the original values are not "decimally accurate" to start with, so it is not important for the expected results to maintain decimal accuracy.

Non-Integral Type

datatypePurpose
StringRepresents alphanumeric text as a series of Unicode characters. String Type is used for all text data manipulations.
TimeSpanRepresents a time interval.
DateTimeRepresents an instant in time, typically expressed as a date and time of day.
BooleanRepresents a Boolean (true or false) value. Used in logical evaluations like ‘Yes’ or ‘No’.
FileDataRepresents File in Decisions. Contains following members: Content (Byte Array), FileName (String), FileType (String), Length (Int32), Tag (Object).

Data Type Naming Rules

Data Types cannot have non-Latin characters and most special characters. Their names cannot begin with digits. Their names cannot be null.

The chart below shows which special characters can and cannot be used.

CharacterUseable?
!No
@No
#No
$No
%No
^No
&No
*No
(No
)No
-Yes
_Yes
+No
=No
{No
}No
[No
]No
,No
.No
<No
>No
?No
/No
\No
|No

Was this article helpful?