# 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;

![](/files/-M-sPhCuPoHcdhFSeip0)

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 ](/6.11/development/flow-studio/flowscript/functions/number-functions.md)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](/6.11/development/flow-studio/flowscript/statements.md#type-declarations) section for more information.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://help.novacuraflow.com/6.11/development/flow-studio/flowscript/variables.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
