# \[FIXED\] HomeyScript: a renamed script is still presented with its previous name in drop-down menus?

**URL:** <https://community.homey.app/t/fixed-homeyscript-a-renamed-script-is-still-presented-with-its-previous-name-in-drop-down-menus/64541>\
**Category:** Apps\
**Tags:** homeyscript, homey-pro\
**Created:** [June 9, 2022, 7:06pm UTC](https://community.homey.app/t/fixed-homeyscript-a-renamed-script-is-still-presented-with-its-previous-name-in-drop-down-menus/64541 "2022-06-09T19:06:51Z")\
**Posts on this page:** 5\
**Page:** 1

<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:** [June 9, 2022, 7:06pm UTC](https://community.homey.app/t/fixed-homeyscript-a-renamed-script-is-still-presented-with-its-previous-name-in-drop-down-menus/64541/1 "2022-06-09T19:06:51Z")

</div>

Hi all,

HomeyScript scripts can be renamed, but the ‘old’ name keeps popping up anywhere else, when you want to select the script, like in a flow.  
I guess it’s not my Homey Pro only?

- Renamed script

> ![Screenshot from 2022-06-09 21-03-07](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/b/5/b5e295867f2a1cc1eb4af7257b2662f967f422cc.png)

- Flow

> ![Screenshot from 2022-06-09 21-01-26](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/f/b/fbf64b79716f193967fed705ea4afd004497fc35.png)

---

<div class="post-metadata">

**Author:** ![Jero](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/jero/32/17556_2.png) [@Jero](https://community.homey.app/u/Jero)\
**Post date:** [June 9, 2022, 7:29pm UTC](https://community.homey.app/t/fixed-homeyscript-a-renamed-script-is-still-presented-with-its-previous-name-in-drop-down-menus/64541/2 "2022-06-09T19:29:35Z")

</div>

Unfortunately arguments are not a typical database relation to anything system wide. They are just saved as an id with whatever the name was on saving(argument autocomplete for app devs). Apps can never know when their saved arguments get updated with a new name since it only has an id to work with. They could actively monitor all Flows with the web api but this still leaves them unable to update argument names since apps cant update Flows so they can only warn that a name is out of sync. The same applies to deletion.

I’m don’t think calling this a bug applies here because it’s just a implementation choice.

---

<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:** [June 9, 2022, 8:25pm UTC](https://community.homey.app/t/fixed-homeyscript-a-renamed-script-is-still-presented-with-its-previous-name-in-drop-down-menus/64541/3 "2022-06-09T20:25:53Z")

</div>

Thanks for looking into this, Jero. I’ve changed the topic title.  
Now I don’t get why Athom introduced the possibility to rename scripts.  
 ![Screenshot from 2022-06-10 01-42-16](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/4/a/4ab7ce7233582727a0a2e52d4ac094668039de58.png)

I know apps can’t update flows, but when I rename a flow or variable, the new name gets presented when I want to pick that flow or variable from a drop-down.  
As you can see in the second screenshot, the changed Homeyscript name `ConvertSec-2-HHMMSS` isn’t presented in the drop-down.

~Peter

---

<div class="post-metadata">

**Author:** ![Jero](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/jero/32/17556_2.png) [@Jero](https://community.homey.app/u/Jero)\
**Post date:** [June 9, 2022, 8:50pm UTC](https://community.homey.app/t/fixed-homeyscript-a-renamed-script-is-still-presented-with-its-previous-name-in-drop-down-menus/64541/4 "2022-06-09T20:50:12Z")

</div>

You are right this is indeed a bug [com.athom.homeyscript/app.js at 9c528865ebcef7d00359b432c5834750230d7a44 · athombv/com.athom.homeyscript · GitHub](https://github.com/athombv/com.athom.homeyscript/blob/9c528865ebcef7d00359b432c5834750230d7a44/app.js#L194) this method still returns the id as the name. I will look into it 😉

---

<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:** [June 10, 2022, 6:17pm UTC](https://community.homey.app/t/fixed-homeyscript-a-renamed-script-is-still-presented-with-its-previous-name-in-drop-down-menus/64541/5 "2022-06-10T18:17:18Z")

</div>

Thanks for the quick fix, Jeroen!  
Fixed in v3.3.1

 ![Screenshot_20220610-201153_Homey](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/d/4/d4d439191913ae3003293f359493b3650f741559.jpeg)
