# Learn name/path of property in binding script

**URL:** <https://forum.inductiveautomation.com/t/learn-name-path-of-property-in-binding-script/70081>\
**Category:** Ignition\
**Tags:** scripting, perspective\
**Created:** [February 20, 2023, 6:56pm UTC](https://forum.inductiveautomation.com/t/learn-name-path-of-property-in-binding-script/70081 "2023-02-20T18:56:24Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![justin.brzozoski](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/justin.brzozoski/32/13452_2.png) [@justin.brzozoski](https://forum.inductiveautomation.com/u/justin.brzozoski)\
**Post date:** [February 20, 2023, 6:56pm UTC](https://forum.inductiveautomation.com/t/learn-name-path-of-property-in-binding-script/70081/1 "2023-02-20T18:56:25Z")

</div>

We have a bunch of properties in a Perspective view which all have bindings that run a _nearly_ identical script. Properties look like this in Designer:

![Screenshot from 2023-02-20 13-45-32](https://us1.discourse-cdn.com/inductiveautomation/original/3X/7/3/73e0d060ff201de295af51e22c68b76d1afe0b66.png)

All of those bindings have a script in them that just calls the same function with one changed parameter that gives the name of the property it is bound to. So, the binding on `AlarmEnabled` calls

```auto
doFoo('AlarmEnabled',x,y,z)

```

while the one on `AlarmMode` calls

```auto
doFoo('AlarmMode',x,y,z)

```

Is there any way that the binding transform script could find the full or partial property path for the property it is attached to? It's a simple thing, but could save me a lot of time copy-paste-editing bindings. Same with onChange scripts as well: there's no way to find the name of the property that is attached to, and I have to do similar copy-paste-edit work often.

---

<div class="post-metadata">

**Author:** ![automatisation](https://avatars.discourse-cdn.com/v4/letter/a/94ad74/32.png) [@automatisation](https://forum.inductiveautomation.com/u/automatisation)\
**Post date:** [February 20, 2023, 7:20pm UTC](https://forum.inductiveautomation.com/t/learn-name-path-of-property-in-binding-script/70081/2 "2023-02-20T19:20:48Z")

</div>

What if you do a binding on the parent of the object and loop through its keys ?  
call your doFoo script with the key name as the parameter and return the value in the key's value.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [February 20, 2023, 7:54pm UTC](https://forum.inductiveautomation.com/t/learn-name-path-of-property-in-binding-script/70081/3 "2023-02-20T19:54:09Z")

</div>

Eeewww!

This is what an expression **structure** binding is for--supply multiple properties at once.
