# Violet Variables

### Using Violet Variables

To use Violet Variables, you must have other data in the system that you would like to use in a script, either through creating integrations or by creating parameters. In my example, I have created a Duro Integration that is pulling in a variety of components.

To create a Violet Variable use the reserved <mark style="background-color:purple;">**Violet\["variable\_name"]**</mark> syntax within your script, where the variable\_name can be replaced with the name of your choice. Variable names must be unique within each script and can only contain letters and numbers. You can use an underscore to separate words.

<figure><img src="https://2091741164-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvrraExym8pNEUvBDoima%2Fuploads%2F0cL2nND5ABQEkaV7alpV%2Fimage%20(3).png?alt=media&#x26;token=325b7896-1b70-4b80-8719-92bbff281940" alt=""><figcaption></figcaption></figure>

After creating a variable, you'll be prompted to link the variable to the data of your choice. Each variable you have created will show up in this sidebar, with a link symbol next to it. Clicking on the link will open a popup that lets you search through the data in the system. Select the property you would like to link to that Violet Variable.

<figure><img src="https://2091741164-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvrraExym8pNEUvBDoima%2Fuploads%2FuJ9ZqCWKLZb29mg6Kuln%2Fimage%20(4).png?alt=media&#x26;token=bcb99f67-331b-4bf9-bfc2-912652b89745" alt=""><figcaption></figcaption></figure>

The selected property value will display next to the link symbol. Ensure it is correct, and link any additional variables you may have. Hit save to save the links and close the sidebar.

<figure><img src="https://2091741164-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvrraExym8pNEUvBDoima%2Fuploads%2FsGqytzCfNiAtxZTITz1r%2Fimage%20(5).png?alt=media&#x26;token=221a6236-d1c9-4a4e-b1af-c76d01aa08cf" alt="" width="375"><figcaption></figcaption></figure>

Click <mark style="background-color:purple;">**Run Script**</mark>**.** Your output will accurately reflect the values of each Violet Variable at the time of the run.

<figure><img src="https://2091741164-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvrraExym8pNEUvBDoima%2Fuploads%2F9j7TDKZTMUOFoEdW02fO%2Fimage%20(6).png?alt=media&#x26;token=23f452b7-09a2-4193-81bd-5e905e5227ce" alt=""><figcaption></figcaption></figure>
