# Power Table Dropdown get underlying value from script

**URL:** <https://forum.inductiveautomation.com/t/power-table-dropdown-get-underlying-value-from-script/22302>\
**Category:** Ignition\
**Tags:** ignition79\
**Created:** [February 1, 2019, 9:39pm UTC](https://forum.inductiveautomation.com/t/power-table-dropdown-get-underlying-value-from-script/22302 "2019-02-01T21:39:38Z")\
**Posts on this page:** 4\
**Page:** 1

<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:** [February 1, 2019, 9:39pm UTC](https://forum.inductiveautomation.com/t/power-table-dropdown-get-underlying-value-from-script/22302/1 "2019-02-01T21:39:38Z")

</div>

Hi everyone,  
I am stuck on something that I hope has an easy answer.  
We use numerous power tables, with cells configured for drop down editors that are filled by SQL Queries of  
{ID,Text}  
The issue I am having is how do I get the actual value of the CELL(ID) and not the text that the drop down displays?  
We use right click popup menus and some of the subsequent scripting relies on the actual cell value and not the text being displayed. getValueAt returns the text instead of the value.

---

<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:** [February 9, 2019, 10:35pm UTC](https://forum.inductiveautomation.com/t/power-table-dropdown-get-underlying-value-from-script/22302/2 "2019-02-09T22:35:57Z")

</div>

_BUMP_  
None of the dig deep java gurus have an idea on this? ☹

---

<div class="post-metadata">

**Author:** ![jshaffer09](https://avatars.discourse-cdn.com/v4/letter/j/df788c/32.png) [@jshaffer09](https://forum.inductiveautomation.com/u/jshaffer09)\
**Post date:** [February 10, 2019, 1:54pm UTC](https://forum.inductiveautomation.com/t/power-table-dropdown-get-underlying-value-from-script/22302/3 "2019-02-10T13:54:18Z")

</div>

this will give you the actual select value from a drop down if I am understanding you right.

event.source.parent.getComponent(‘Your Drop Down Name Goes Here’).selectedValue

---

<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, 2019, 2:12pm UTC](https://forum.inductiveautomation.com/t/power-table-dropdown-get-underlying-value-from-script/22302/4 "2019-02-10T14:12:51Z")

</div>

It seems to me you’d need to implement both a custom cell editor and a custom cell renderer. The editor would return the desired underlying value, and the renderer would display the desired visible string given the underlying value.
