# Keeping the selected value of a table when using a popup

**URL:** <https://forum.inductiveautomation.com/t/keeping-the-selected-value-of-a-table-when-using-a-popup/8575>\
**Category:** Ignition\
**Created:** [June 16, 2014, 7:19pm UTC](https://forum.inductiveautomation.com/t/keeping-the-selected-value-of-a-table-when-using-a-popup/8575 "2014-06-16T19:19:39Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![drewdin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/drewdin/32/3363_2.png) [@drewdin](https://forum.inductiveautomation.com/u/drewdin)\
**Post date:** [June 16, 2014, 7:19pm UTC](https://forum.inductiveautomation.com/t/keeping-the-selected-value-of-a-table-when-using-a-popup/8575/1 "2014-06-16T19:19:39Z")

</div>

I ran into a weird issue, I have a two tables (Table A and Table B) that display results from a DB query. You select a row in Table A which filters the results of Table B. I need to insert a row into Table B, For a few reasons, in order to add a new row to Table B I need to use a popup window appears that takes your information, inserts it into the DB and then closes.

This is where I have in issue, after the insert when the popup closes and goes back to the main screen it deselects the selected rows in Table A and B. There could be a lot of results and trying to find the previous selected items is a pain.

I tried a few ways to reselect the selected items in the table but I have not been able to. I tried custom properties, scripting, table.setSelectedRow(), etc…

Does anyone have a good way to re-select a row when the screen becomes active again?

---

<div class="post-metadata">

**Author:** ![adamaustin](https://avatars.discourse-cdn.com/v4/letter/a/5f8ce5/32.png) [@adamaustin](https://forum.inductiveautomation.com/u/adamaustin)\
**Post date:** [June 16, 2014, 9:45pm UTC](https://forum.inductiveautomation.com/t/keeping-the-selected-value-of-a-table-when-using-a-popup/8575/2 "2014-06-16T21:45:56Z")

</div>

This doesn’t sound normal. Are you sure there is no code running in your [internalFrameActivated](http://inductiveautomation.com/support/usermanuals/ignition/event_types.htm) event for your window? Anyway, if you have to, you could try storing the selected values in one or more [client tags](http://inductiveautomation.com/support/usermanuals/ignition/types_of_sqltags.htm) before opening the window.
