# Window with data details linked from table

**URL:** <https://forum.inductiveautomation.com/t/window-with-data-details-linked-from-table/15519>\
**Category:** Ignition\
**Created:** [September 30, 2017, 9:18am UTC](https://forum.inductiveautomation.com/t/window-with-data-details-linked-from-table/15519 "2017-09-30T09:18:10Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![jimjohnson](https://avatars.discourse-cdn.com/v4/letter/j/898d66/32.png) [@jimjohnson](https://forum.inductiveautomation.com/u/jimjohnson)\
**Post date:** [September 30, 2017, 9:18am UTC](https://forum.inductiveautomation.com/t/window-with-data-details-linked-from-table/15519/1 "2017-09-30T09:18:10Z")

</div>

I apologize if this is covered somewhere, but I’ve not done a whole lot with the Vision side of Ignition, and I am trying to figure out how to go about this… I want to have a window with a table showing some of the columns of data from a SQL table and then make the serial number in each row clickable (a link or action) to switch to a window which has all the data (from multiple SQL tables) on that one part. Can anyone point me to an article or give me some steps for this? I have the basic table, but can’t figure out what to do next.

---

<div class="post-metadata">

**Author:** ![MMaynard](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mmaynard/32/3366_2.png) [@MMaynard](https://forum.inductiveautomation.com/u/MMaynard)\
**Post date:** [September 30, 2017, 11:49am UTC](https://forum.inductiveautomation.com/t/window-with-data-details-linked-from-table/15519/2 "2017-09-30T11:49:02Z")

</div>

On the second window create a custom property on the root container called ID of type Integer  
Then on the first window power table, go into scripting, under Extension Functions edit onDoubleClick  
Add code like

```auto
	if colIndex==0:
		param1 = value
		window = system.nav.openWindow('SecondWindowName', {'ID' : param1})
		system.nav.centerWindow(window)

```

This will open the second window when the ID column of the table is double clicked, passing the ID value to the window.  
Then in the data source for the second window tables, pass the root container ID variable in the where clause.

---

<div class="post-metadata">

**Author:** ![jimjohnson](https://avatars.discourse-cdn.com/v4/letter/j/898d66/32.png) [@jimjohnson](https://forum.inductiveautomation.com/u/jimjohnson)\
**Post date:** [October 1, 2017, 3:36am UTC](https://forum.inductiveautomation.com/t/window-with-data-details-linked-from-table/15519/3 "2017-10-01T03:36:55Z")

</div>

This works great! One thing that got me at first - if ID is a hidden column, it still counts and is sent. I was thinking it was the first displayed column and was getting no results on my second page. Here is my SQL (for reference for others):

SELECT CoverBarcode  
FROM ClutchData  
WHERE ID = {Root Container.ID}  
ORDER BY ID DESC

---

<div class="post-metadata">

**Author:** ![jimjohnson](https://avatars.discourse-cdn.com/v4/letter/j/898d66/32.png) [@jimjohnson](https://forum.inductiveautomation.com/u/jimjohnson)\
**Post date:** [October 1, 2017, 7:14am UTC](https://forum.inductiveautomation.com/t/window-with-data-details-linked-from-table/15519/4 "2017-10-01T07:14:51Z")

</div>

The only thing that is acting oddly that I haven’t solved is the button bar on the left which uses a tab strip - it doesn’t notice I changed windows, and to go back to the table, I have to click another button and then click the button of the table.

---

<div class="post-metadata">

**Author:** ![jimjohnson](https://avatars.discourse-cdn.com/v4/letter/j/898d66/32.png) [@jimjohnson](https://forum.inductiveautomation.com/u/jimjohnson)\
**Post date:** [October 4, 2017, 5:56am UTC](https://forum.inductiveautomation.com/t/window-with-data-details-linked-from-table/15519/5 "2017-10-04T05:56:07Z")

</div>

Anyone know how to make the tab strip navigation notice the screen change? Or, is there a Back button I can add, to revert back?

---

<div class="post-metadata">

**Author:** ![MMaynard](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mmaynard/32/3366_2.png) [@MMaynard](https://forum.inductiveautomation.com/u/MMaynard)\
**Post date:** [October 4, 2017, 12:04pm UTC](https://forum.inductiveautomation.com/t/window-with-data-details-linked-from-table/15519/6 "2017-10-04T12:04:58Z")

</div>

You could write to the tab control in the code above and select the other tab

---

<div class="post-metadata">

**Author:** ![jimjohnson](https://avatars.discourse-cdn.com/v4/letter/j/898d66/32.png) [@jimjohnson](https://forum.inductiveautomation.com/u/jimjohnson)\
**Post date:** [October 5, 2017, 12:09am UTC](https://forum.inductiveautomation.com/t/window-with-data-details-linked-from-table/15519/7 "2017-10-05T00:09:48Z")

</div>

Any examples for that?

---

<div class="post-metadata">

**Author:** ![MMaynard](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mmaynard/32/3366_2.png) [@MMaynard](https://forum.inductiveautomation.com/u/MMaynard)\
**Post date:** [October 5, 2017, 12:41pm UTC](https://forum.inductiveautomation.com/t/window-with-data-details-linked-from-table/15519/8 "2017-10-05T12:41:17Z")

</div>

`system.gui.getWindow("NameOfWindowWithTabsOnIt").rootContainer.getComponent('NameOfTabControlToModify').selectedTab = "NameOfTabToSetSelectedTo"`

---

<div class="post-metadata">

**Author:** ![jimjohnson](https://avatars.discourse-cdn.com/v4/letter/j/898d66/32.png) [@jimjohnson](https://forum.inductiveautomation.com/u/jimjohnson)\
**Post date:** [October 6, 2017, 12:07am UTC](https://forum.inductiveautomation.com/t/window-with-data-details-linked-from-table/15519/9 "2017-10-06T00:07:03Z")

</div>

> [@MMaynard](#):
>
> system.gui.getWindow("NameOfWindowWithTabsOnIt").rootContainer.getComponent('NameOfTabControlToModify').selectedTab = "NameOfTabToSetSelectedTo"

Did the trick! Thanks!!
