# Variables

Flow variables come in three different categories: *simple values*, *records* and *tables*.

### **Simple values**

A "simple value" (known as a "primitive type" value in some programming languages) is the most common variable type. A simple value variable can contain text ("string"), a number, a date, or a truth (Boolean) value. Internally, Flow keeps track of exactly which one of these sub-types a value currently has; however, as a user of the Flow Designer you rarely have to care about the exact type of a variable, since Flow will go to great lengths to automatically convert the types into something that makes sense in your workflow.&#x20;

![](https://543770944-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LtPTgZOYmpJka4jqs1v%2F-M-sNNjKLVmonjWASMMl%2F-M-sPhCuPoHcdhFSeip0%2Fhelp_root_flow_script_variables_assignment_example.png?alt=media\&token=ad105a6a-311e-4bfe-a153-ec1620264e5b)

See Assignment row 1-3 for different types of simple value assignment.

### Literals

The following list describes the different types of literals available in FlowScript.

| Example | Result                                                   |
| ------- | -------------------------------------------------------- |
| "abcd"  | A simple value containing the string *abcd*              |
| 'abcd'  | A simple value containing the string *abcd*              |
| 1       | A simple value containing the integer value *1*          |
| 1.5     | A simple value containing the floating point value *1.5* |
| true    | A simple value containing the boolean *true*             |
| false   | A simple value containing the boolean *false*            |

{% hint style="info" %}
Note that FlowScript supports both single- and double quoted strings, allowing you to construct literals like "it's 'good' to be here" or 'hello "world"'.
{% endhint %}

### **NaN values**

When fetching data from outside sources using connectors, Flow will sometimes encounter numeric values that are set to *null* in a third party system. Such values are converted into a special NaN ("Not a Number") values in Flow. The [IsNaN function ](https://help.novacuraflow.com/6.11/development/flow-studio/flowscript/functions/number-functions)can be used to test for this.

A table is a structure of columns and rows. Tables can be defined by one or more records (see row 6 in Assignment step above). There are many more ways to produce a table, for exmaple by using a [Table step](https://home.novacuraflow.com/Help/latest/?designer_applications_workflow_table) or [Machine step](https://home.novacuraflow.com/Help/latest/?designer_applications_workflow_machine_task). TODO

### **Records**

A record (roughly equivalent to a "dictionary" or "object" in other programming languages) is a group of named values.

Records are constructed using the following syntax:

```fsharp
[fieldName: <value>, otherFieldName: <value>]
```

See Assignment row 4 where a new record with name *recordA* is assigned with a value for *name* and *age*. This record can later on be used just like *recordB* is used on row 5.

### **Tables**

You can use the unary asterisk operator (\*) to create a single-row table from a record:

```fsharp
*[a: 1, b: 2] // creates a table with a single row where a = 1 and b = 2
```

### Nil values

FlowScript supports *nil* values for records where the record has a known type. This allows recursive type definitions. In most cases, nil values are not allowed. Please see the [Programs](https://help.novacuraflow.com/6.11/development/flow-studio/statements#type-declarations) section for more information.
