# Global Variables

Global variables in the portal are not to be confused with global variables in Flow 6. In the portal, they are used to pass in variables by adding them to the URL, separated by ampersands.&#x20;

Example of URL with parameters: <http://www.myflowportal2.com/#/?page123\\&GlobalVariable1=ValueA\\&GlobalVariable2=ValueB&#x20>;

In this example, the global variables GlobalVariable1 and GlobalVariable2 are defined with the values ValueA and ValueB.&#x20;

### How to configure Global Variables

Global variables are set in the Settings section of Portal.&#x20;

![](/files/Xs9BoLsFOWQKyt9kyrpu)<br>

To add a new Global variable, give it a name, press the plus button, and hit save.\
&#x20;Clicking on the trashcan icon will delete the variable.

&#x20;

<figure><img src="/files/OTi5gU00ICyNvTfjNfZe" alt=""><figcaption></figcaption></figure>

An example of using the global variable with **database** as the data source:&#x20;

```sql
select MyColumnOne
       ,:Global.GlobalVariable1 as Variable1Column 
from MyTable
where MyColumnOne = :Global.GlobalVariable2
```

The global variable is reached by using the :Global syntax followed by what you named your variable. That will then be replaced with what you have set the variable to be in the URL string.&#x20;

Using **workflow** as the data source:

Data source machine workflow should include Global variables in the start step (green ring), and assignment for global variables inside of the workflow.&#x20;

**Use global variables in workflow** must be checked for global variables:&#x20;

![](/files/bKoJd08hWv5l3uTlXM9L)

A record called GlobalVariabes containing your global variables needs to be added to the data source workflow. Those variables can then, among other things, be used in the  select statements in the workflow:

<figure><img src="/files/PyQyASB5paPIPEh5u45c" alt=""><figcaption></figcaption></figure>


---

# 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/development/flow-portal-2/getting-started/settings/global-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.
