# Accessing name of the component in which the expression binding resides

**URL:** <https://forum.inductiveautomation.com/t/accessing-name-of-the-component-in-which-the-expression-binding-resides/55982>\
**Category:** Ignition\
**Tags:** ignition80\
**Created:** [February 10, 2022, 2:08pm UTC](https://forum.inductiveautomation.com/t/accessing-name-of-the-component-in-which-the-expression-binding-resides/55982 "2022-02-10T14:08:50Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jacob\_Sanchez](https://avatars.discourse-cdn.com/v4/letter/j/9fc29f/32.png) [@Jacob\_Sanchez](https://forum.inductiveautomation.com/u/Jacob_Sanchez)\
**Post date:** [February 10, 2022, 2:08pm UTC](https://forum.inductiveautomation.com/t/accessing-name-of-the-component-in-which-the-expression-binding-resides/55982/1 "2022-02-10T14:08:50Z")

</div>

I’m wanting to pass the name of a component to a script, the name being whatever component ran that script, instead of having to manually link each component in every expression. Is this possible?

runScript(“testing.test8”, 2000, {thisComponent.name})

---

<div class="post-metadata">

**Author:** ![dillon](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/dillon/32/81537_2.png) [@dillon](https://forum.inductiveautomation.com/u/dillon)\
**Post date:** [February 10, 2022, 2:15pm UTC](https://forum.inductiveautomation.com/t/accessing-name-of-the-component-in-which-the-expression-binding-resides/55982/2 "2022-02-10T14:15:50Z")

</div>

runScript(“testing.test8”, 2000, **{this.meta.name}** )

---

<div class="post-metadata">

**Author:** ![Jacob\_Sanchez](https://avatars.discourse-cdn.com/v4/letter/j/9fc29f/32.png) [@Jacob\_Sanchez](https://forum.inductiveautomation.com/u/Jacob_Sanchez)\
**Post date:** [February 10, 2022, 2:19pm UTC](https://forum.inductiveautomation.com/t/accessing-name-of-the-component-in-which-the-expression-binding-resides/55982/3 "2022-02-10T14:19:14Z")

</div>

Thank You,

I am getting the following error with this.

[AWT-EventQueue-0] ERROR com.inductiveautomation.ignition.client.util.gui.ErrorUtil - Unable to find component for path: ‘this.meta.name’

---

<div class="post-metadata">

**Author:** ![dillon](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/dillon/32/81537_2.png) [@dillon](https://forum.inductiveautomation.com/u/dillon)\
**Post date:** [February 10, 2022, 2:22pm UTC](https://forum.inductiveautomation.com/t/accessing-name-of-the-component-in-which-the-expression-binding-resides/55982/4 "2022-02-10T14:22:17Z")

</div>

That error to me _seems_ like it’s looking for the component. Maybe try just passing **{this}**? it’s a stretch…

---

<div class="post-metadata">

**Author:** ![Jacob\_Sanchez](https://avatars.discourse-cdn.com/v4/letter/j/9fc29f/32.png) [@Jacob\_Sanchez](https://forum.inductiveautomation.com/u/Jacob_Sanchez)\
**Post date:** [February 10, 2022, 2:24pm UTC](https://forum.inductiveautomation.com/t/accessing-name-of-the-component-in-which-the-expression-binding-resides/55982/5 "2022-02-10T14:24:26Z")

</div>

I tried {this} and {this.name}, neither of which give an error, but both pass “None” to the script. Or would “None” mean that there is literally nothing in the var holding what was “sent”?

My script is just printing out what is passed to it.

```auto
def test8(x):
	print(x)
	return 0

```

Here is the expression

```auto
if(runScript("test1.test8", 2000, {this.meta.name}),
	color(0,255,0),
	color(255,0,0))

```

---

<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 10, 2022, 2:56pm UTC](https://forum.inductiveautomation.com/t/accessing-name-of-the-component-in-which-the-expression-binding-resides/55982/6 "2022-02-10T14:56:17Z")

</div>

`runScript()` borrowed the idea of argument passing from my `objectScript()` function, but not the rest of its features. You want to examine the `binding` value it supplies to scripts.

Start here:

> **[Ignition Third-Party Module Showcase](https://inductiveautomation.com/moduleshowcase/module/automation-professionals-llc-simulation-aids)**
>
> Easily extend Ignition's core functionality with Third-Party Modules. The Module Showcase is a great place to find a solution that best meets your needs.

---

<div class="post-metadata">

**Author:** ![Jacob\_Sanchez](https://avatars.discourse-cdn.com/v4/letter/j/9fc29f/32.png) [@Jacob\_Sanchez](https://forum.inductiveautomation.com/u/Jacob_Sanchez)\
**Post date:** [February 10, 2022, 3:28pm UTC](https://forum.inductiveautomation.com/t/accessing-name-of-the-component-in-which-the-expression-binding-resides/55982/7 "2022-02-10T15:28:52Z")

</div>

Thank you, i will read up.
