# Variable in JS mapper

**URL:** <https://community.integray.com/t/variable-in-js-mapper/178>\
**Category:** Platform discussions\
**Tags:** js-mapper, task-step, connector\
**Created:** [October 16, 2023, 6:35pm UTC](https://community.integray.com/t/variable-in-js-mapper/178 "2023-10-16T18:35:28Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Filip](https://avatars.discourse-cdn.com/v4/letter/f/919ad9/32.png) [@Filip](https://community.integray.com/u/Filip)\
**Post date:** [October 16, 2023, 6:35pm UTC](https://community.integray.com/t/variable-in-js-mapper/178/1 "2023-10-16T18:35:29Z")

</div>

Hi, is it possible to use Variable in JS mapping statement ? I tried different variants of syntax, but nothing works.

---

<div class="post-metadata">

**Author:** ![tomas](https://avatars.discourse-cdn.com/v4/letter/t/439d5e/32.png) [@tomas](https://community.integray.com/u/tomas)\
**Post date:** [October 17, 2023, 6:55am UTC](https://community.integray.com/t/variable-in-js-mapper/178/2 "2023-10-17T06:55:08Z")

</div>

Hi,

what type of variable you mean. In JS Mapper as well as in Node.js you can use variables / constants defined in the code. If you want to use general variable defined Integray you have to use the following example:

`const myVar = "${#VariableName}";`

Hope this helps.

Tomas.

---

<div class="post-metadata">

**Author:** ![Filip](https://avatars.discourse-cdn.com/v4/letter/f/919ad9/32.png) [@Filip](https://community.integray.com/u/Filip)\
**Post date:** [October 17, 2023, 8:36am UTC](https://community.integray.com/t/variable-in-js-mapper/178/3 "2023-10-17T08:36:58Z")

</div>

Thanks for help

Filip.

---

<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 24, 2023, 8:37am UTC](https://community.integray.com/t/variable-in-js-mapper/178/4 "2023-10-24T08:37:49Z")

</div>

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