# Parameterized Popup from Table

**URL:** <https://forum.inductiveautomation.com/t/parameterized-popup-from-table/57848>\
**Category:** Ignition\
**Tags:** ignition81, perspective\
**Created:** [March 31, 2022, 1:51am UTC](https://forum.inductiveautomation.com/t/parameterized-popup-from-table/57848 "2022-03-31T01:51:23Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Casu](https://avatars.discourse-cdn.com/v4/letter/c/49beb7/32.png) [@Casu](https://forum.inductiveautomation.com/u/Casu)\
**Post date:** [March 31, 2022, 1:51am UTC](https://forum.inductiveautomation.com/t/parameterized-popup-from-table/57848/1 "2022-03-31T01:51:23Z")

</div>

Hi all, I am currently trying to open a popup from a table. It is configured to open onRowClick, when a user clicks onto the table itself. I am a bit stuck on how to pass the data inside the table cell onto the popup (as a parameter) if it is even possible.

The only thought I have is passing {/root/Table/props.data} but this wouldn’t work as it would force the entire table data inside. I can find the cell position through the selectedRow, but not sure how to point at the data at this position.

---

<div class="post-metadata">

**Author:** ![cmallonee](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/cmallonee/32/6416_2.png) [@cmallonee](https://forum.inductiveautomation.com/u/cmallonee)\
**Post date:** [March 31, 2022, 3:28am UTC](https://forum.inductiveautomation.com/t/parameterized-popup-from-table/57848/2 "2022-03-31T03:28:40Z")

</div>

You should make sure you’re using a Script Action to open the Popup. If you do this, the script has an `event` object available which contains information about the row which was clicked:

```auto
def runAction(self, event):
	"""
	Fired when a row in the table is clicked.

	Arguments:
		self: A reference to the component that is invoking this function.
		event: An object with the following attributes:
			row (int): The unique row index as it is represented in the source
			           data. Also known as the row ID.
			rowIndex (int): The row index as it is represented in the current
			                visible data.
			value (dict): The row's value as a JSON object.
	"""

```

If `event.row` or `event.rowIndex` don’t work for what you need becuase your value is part of the row’s data, then you would need to reference it a la `event.value["<relevant_column_name_here>"]`.  
Example:

```auto
system.perspective.openPopup(id="Something", viewPath="SomePath/SomeView", params={"someParam": event.value["<relevant_column_name_here>"]})

```

---

<div class="post-metadata">

**Author:** ![Casu](https://avatars.discourse-cdn.com/v4/letter/c/49beb7/32.png) [@Casu](https://forum.inductiveautomation.com/u/Casu)\
**Post date:** [March 31, 2022, 11:57pm UTC](https://forum.inductiveautomation.com/t/parameterized-popup-from-table/57848/3 "2022-03-31T23:57:25Z")

</div>

Hi there,  
I’ve had trouble passing in the parameter - I’ve tested the code and the right value is being read from the table row, just not sure why it is not getting input as a parameter: the following is my code :

```auto
system.perspective.openPopup("Popup ID", 'file/file/file/file', params={ "path" : event.value["parameter"]}, showCloseIcon = True, resizable = False)

```

I’ve also output the parameter itself to a label and can confirm its showing up as the correct value for the event.value[“parameter”]. It seems to just not be going in as a parameter for the popup. I’ve also put a label on the popup to show the parameter, of which it is the default value. Any advice?

---

<div class="post-metadata">

**Author:** ![cmallonee](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/cmallonee/32/6416_2.png) [@cmallonee](https://forum.inductiveautomation.com/u/cmallonee)\
**Post date:** [April 1, 2022, 2:42am UTC](https://forum.inductiveautomation.com/t/parameterized-popup-from-table/57848/4 "2022-04-01T02:42:31Z")

</div>

Could you share a picture of the params you have set up for the View being opened in the Popup?

---

<div class="post-metadata">

**Author:** ![Casu](https://avatars.discourse-cdn.com/v4/letter/c/49beb7/32.png) [@Casu](https://forum.inductiveautomation.com/u/Casu)\
**Post date:** [April 2, 2022, 2:27am UTC](https://forum.inductiveautomation.com/t/parameterized-popup-from-table/57848/5 "2022-04-02T02:27:02Z")

</div>

Hi cmallonee,  
I found my mistake - I wasn’t actually passing the parameter through because of some grammar issues - this caused the wrong input to be pushed through. A good lesson to double check any written code. Cheers
