# Passing Parameters

**URL:** <https://forum.inductiveautomation.com/t/passing-parameters/5155>\
**Category:** Ignition\
**Created:** [September 17, 2012, 6:43pm UTC](https://forum.inductiveautomation.com/t/passing-parameters/5155 "2012-09-17T18:43:33Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![WildeKurt](https://avatars.discourse-cdn.com/v4/letter/w/50afbb/32.png) [@WildeKurt](https://forum.inductiveautomation.com/u/WildeKurt)\
**Post date:** [September 17, 2012, 6:43pm UTC](https://forum.inductiveautomation.com/t/passing-parameters/5155/1 "2012-09-17T18:43:33Z")

</div>

I’m not getting this. I want to pass a single item (number) from a source to a destination window. On the button I’m using to open the target (the event handler) I click the Pass Parameters box and enter a property (label text) on the source window. I can’t seem to figure out the ‘Parameter Name’ value. I assume that’s the property on the destination window but every combination I’ve tried causes an error. How do I accomplish this?

Kurt

---

<div class="post-metadata">

**Author:** ![James.Lorenz](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/james.lorenz/32/3290_2.png) [@James.Lorenz](https://forum.inductiveautomation.com/u/James.Lorenz)\
**Post date:** [September 17, 2012, 7:05pm UTC](https://forum.inductiveautomation.com/t/passing-parameters/5155/2 "2012-09-17T19:05:07Z")

</div>

The “parameter name” is the name of the custom property you add to the root container of the destination window. What error are you getting, and what version of Ignition are you using?

---

<div class="post-metadata">

**Author:** ![WildeKurt](https://avatars.discourse-cdn.com/v4/letter/w/50afbb/32.png) [@WildeKurt](https://forum.inductiveautomation.com/u/WildeKurt)\
**Post date:** [September 17, 2012, 7:22pm UTC](https://forum.inductiveautomation.com/t/passing-parameters/5155/3 "2012-09-17T19:22:18Z")

</div>

In the target window I’m trying to get at the parameter ‘StationNumber’ using the internalFrameActivated event. I get: “NameError: StationNumber” My script is:

tmp = StationNumber  
lblStationName.text = "Station " + str(tmp)

I’m using 7.3.3

---

<div class="post-metadata">

**Author:** ![James.Lorenz](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/james.lorenz/32/3290_2.png) [@James.Lorenz](https://forum.inductiveautomation.com/u/James.Lorenz)\
**Post date:** [September 17, 2012, 7:38pm UTC](https://forum.inductiveautomation.com/t/passing-parameters/5155/4 "2012-09-17T19:38:55Z")

</div>

I assume “StationNumber” is a custom property of the root container, right? Also, is lblStationName a label component on the destination window? If so, you’ll need to use the event object to properly access those components in the hierarchy:

`
rc = event.source.rootContainer
tmp = rc.StationNumber
rc.getComponent("lblStationName").text = "Station " + str(tmp)`

For more information about using the event object and working with components:

[inductiveautomation.com/support/ … object.htm](http://inductiveautomation.com/support/usermanuals/ignition/the_event_object.htm)  
[inductiveautomation.com/support/ … onents.htm](http://inductiveautomation.com/support/usermanuals/ignition/working_with_components.htm)

---

<div class="post-metadata">

**Author:** ![WildeKurt](https://avatars.discourse-cdn.com/v4/letter/w/50afbb/32.png) [@WildeKurt](https://forum.inductiveautomation.com/u/WildeKurt)\
**Post date:** [September 17, 2012, 8:21pm UTC](https://forum.inductiveautomation.com/t/passing-parameters/5155/5 "2012-09-17T20:21:44Z")

</div>

Is there anyway to address the propery directly? For example, if I want to modify a table select statement based on a propery value.

---

<div class="post-metadata">

**Author:** ![James.Lorenz](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/james.lorenz/32/3290_2.png) [@James.Lorenz](https://forum.inductiveautomation.com/u/James.Lorenz)\
**Post date:** [September 17, 2012, 9:54pm UTC](https://forum.inductiveautomation.com/t/passing-parameters/5155/6 "2012-09-17T21:54:19Z")

</div>

Are you using the table select statement in a script? If so, runPrepQuery allows you to reference a variable using a placeholder:

[inductiveautomation.com/support/ … pquery.htm](http://inductiveautomation.com/support/usermanuals/ignition/system_db_runprepquery.htm)
