# Advanced Flows Script Variable loading Code?

**URL:** <https://community.homey.app/t/advanced-flows-script-variable-loading-code/144251>\
**Category:** Apps\
**Tags:** homeyscript\
**Created:** [October 18, 2025, 2:59pm UTC](https://community.homey.app/t/advanced-flows-script-variable-loading-code/144251 "2025-10-18T14:59:53Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Crawler31](https://avatars.discourse-cdn.com/v4/letter/c/22d042/32.png) [@Crawler31](https://community.homey.app/u/Crawler31)\
**Post date:** [October 18, 2025, 2:59pm UTC](https://community.homey.app/t/advanced-flows-script-variable-loading-code/144251/1 "2025-10-18T14:59:53Z")

</div>

I want to make a script were i need to “load” variables like currentprice.

I chose the “Then Card” “start script with argument” i select the argument over the Label button.

but what code i need to use to “load” the argumet ?

ChatGPT cant help at all

EDIT AFTER SOLUTION: the [0] was missing

---

<div class="post-metadata">

**Author:** ![Peter\_Kawa](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/peter_kawa/32/173848_2.png) [@Peter\_Kawa](https://community.homey.app/u/Peter_Kawa)\
**Post date:** [October 18, 2025, 3:28pm UTC](https://community.homey.app/t/advanced-flows-script-variable-loading-code/144251/2 "2025-10-18T15:28:01Z")

</div>

In short, aren’t you saying you need the value of some tag in a flowcard?  
(tag = system/app variables, variable = user managed variable)

[![](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/4/4/441f03af3920e71d7e4c61ca60dcdde612a747a8.jpeg "Homey: how to pick a tag from a certain device") ](https://www.youtube.com/watch?v=X-9zO9khx_E)

---

<div class="post-metadata">

**Author:** ![Crawler31](https://avatars.discourse-cdn.com/v4/letter/c/22d042/32.png) [@Crawler31](https://community.homey.app/u/Crawler31)\
**Post date:** [October 18, 2025, 4:08pm UTC](https://community.homey.app/t/advanced-flows-script-variable-loading-code/144251/3 "2025-10-18T16:08:40Z")

</div>

Thanks for the answer but

No not inside A Flowcard. Inside a Script coded in Advanced Flow setup not inside the app. Im asking for the javascript code.ö

Any answer Chatgpt gave me Ended in Errors like “unknown argument”

 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/9/a/9a6a15b9b7a6b302c863d2a74be7f29076865d62.jpeg)

---

<div class="post-metadata">

**Author:** ![Peter\_Kawa](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/peter_kawa/32/173848_2.png) [@Peter\_Kawa](https://community.homey.app/u/Peter_Kawa)\
**Post date:** [October 18, 2025, 5:13pm UTC](https://community.homey.app/t/advanced-flows-script-variable-loading-code/144251/4 "2025-10-18T17:13:34Z")

</div>

Got it (I hope 😜 ). To pass that argument to the Homeyscript code in the card, you’d use

`const argumentName = args[0];`

---

<div class="post-metadata">

**Author:** ![Crawler31](https://avatars.discourse-cdn.com/v4/letter/c/22d042/32.png) [@Crawler31](https://community.homey.app/u/Crawler31)\
**Post date:** [October 18, 2025, 10:35pm UTC](https://community.homey.app/t/advanced-flows-script-variable-loading-code/144251/5 "2025-10-18T22:35:34Z")

</div>

ok the [0] was the missing Part that i didnt find or got from ChatGpt

---

<div class="post-metadata">

**Author:** ![Peter\_Kawa](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/peter_kawa/32/173848_2.png) [@Peter\_Kawa](https://community.homey.app/u/Peter_Kawa)\
**Post date:** [October 19, 2025, 8:33pm UTC](https://community.homey.app/t/advanced-flows-script-variable-loading-code/144251/6 "2025-10-19T20:33:06Z")

</div>

It’s also in the example code in a new card, but not in the clearest way

 ![Screenshot_20251019_222812_Firefox](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/1/1/11d4d7331ad3691773f54983f848da3d284b452e.jpeg)
