# What for are Variables and how to use them?

**URL:** <https://community.integray.com/t/what-for-are-variables-and-how-to-use-them/165>\
**Category:** Platform discussions\
**Created:** [September 26, 2023, 6:58pm UTC](https://community.integray.com/t/what-for-are-variables-and-how-to-use-them/165 "2023-09-26T18:58:00Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![petr.skruzny](https://avatars.discourse-cdn.com/v4/letter/p/85e7bf/32.png) [@petr.skruzny](https://community.integray.com/u/petr.skruzny)\
**Post date:** [September 26, 2023, 6:58pm UTC](https://community.integray.com/t/what-for-are-variables-and-how-to-use-them/165/1 "2023-09-26T18:58:00Z")

</div>

Hi,  
I see in integray, that I am able to define some Variables - but how to use them? I tried Help, but there is only how to define them. I also browse some examples, but did not find anything…

Can anybody please reveal the secret to me?

---

<div class="post-metadata">

**Author:** ![tomas.vlcek](https://dub1.discourse-cdn.com/flex017/user_avatar/community.integray.com/tomas.vlcek/32/11_2.png) [@tomas.vlcek](https://community.integray.com/u/tomas.vlcek)\
**Post date:** [September 27, 2023, 6:21am UTC](https://community.integray.com/t/what-for-are-variables-and-how-to-use-them/165/2 "2023-09-27T06:21:17Z")

</div>

Hi Peter,

first of all using variables is very good approach to achieve shared configurations.

We can say varibles are placeholders used in your configurations.

And now how to use them. Easily. Variable have following shape **${#VarCode}** , where symbols ${# } are used by Integray to recognize that this part should be replaced by variable and VarCode is code used from your variables.

Here is an example. I have created MSSQL connector step and instead of typing whole connection string I have used variable **${#SQLConnection}**

 ![image](https://europe1.discourse-cdn.com/flex017/uploads/integray/original/1X/7f6e648302a6080a7b67b595467948dc4fd335da.png)

 ![image](https://europe1.discourse-cdn.com/flex017/uploads/integray/original/1X/701fbc9f26e75d38325895d6a183441b6d068bfd.png)

I would recommend to use variables for DB connection, passwords, tokens etc. Generally use variables for setup which can be shared among task steps.

In the case of any question please let me know.

Thanks Tomas

---

<div class="post-metadata">

**Author:** ![petr.skruzny](https://avatars.discourse-cdn.com/v4/letter/p/85e7bf/32.png) [@petr.skruzny](https://community.integray.com/u/petr.skruzny)\
**Post date:** [September 27, 2023, 9:10am UTC](https://community.integray.com/t/what-for-are-variables-and-how-to-use-them/165/3 "2023-09-27T09:10:35Z")

</div>

Just a note: seems to that after you create Variable, you need to Publish the configuration, if you want integray to whisper you new Variable name after you write “$” in task step as it is seen in @tomas.vlcek 's first picture.

---

<div class="post-metadata">

**Author:** ![tomas.vlcek](https://dub1.discourse-cdn.com/flex017/user_avatar/community.integray.com/tomas.vlcek/32/11_2.png) [@tomas.vlcek](https://community.integray.com/u/tomas.vlcek)\
**Post date:** [September 27, 2023, 10:28am UTC](https://community.integray.com/t/what-for-are-variables-and-how-to-use-them/165/4 "2023-09-27T10:28:20Z")

</div>

Yes, you are right. For me it is common to press publish button after any configuration change. I will try to not forget to inform about this next time.

Thanks

---

<div class="post-metadata">

**Author:** ![system](https://avatars.discourse-cdn.com/v4/letter/s/bcef8e/32.png) [@system](https://community.integray.com/u/system)\
**Post date:** [October 4, 2023, 10:28am UTC](https://community.integray.com/t/what-for-are-variables-and-how-to-use-them/165/5 "2023-10-04T10:28:36Z")

</div>

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.
