# 'List' component: getting selected TEXT not index

**URL:** <https://forum.inductiveautomation.com/t/list-component-getting-selected-text-not-index/12285>\
**Category:** Ignition\
**Created:** [October 26, 2016, 9:31am UTC](https://forum.inductiveautomation.com/t/list-component-getting-selected-text-not-index/12285 "2016-10-26T09:31:53Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [October 26, 2016, 9:31am UTC](https://forum.inductiveautomation.com/t/list-component-getting-selected-text-not-index/12285/1 "2016-10-26T09:31:53Z")

</div>

Hi,

I have a List component populated by a SQL query. The only property I can see relating to the selected item is SelectedIndex. I’m very new to Ignition so excuse the possibly dumb question, but how can I get the selected item’s text rather than the index?

To give some context:  
The items in my List are tank numbers e.g.  
9001  
9002  
9003  
9004  
9005  
…

Upon selecting an item and then pressing a Load button, I want to be able to pass the tank number to the page parameter.  
Note: the List will be filterable and so won’t necessarily always start at ‘9001’ (it could start at 1453 for example).

Cheers!

Nick

---

<div class="post-metadata">

**Author:** ![KathyApplebaum](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kathyapplebaum/32/7261_2.png) [@KathyApplebaum](https://forum.inductiveautomation.com/u/KathyApplebaum)\
**Post date:** [October 26, 2016, 2:02pm UTC](https://forum.inductiveautomation.com/t/list-component-getting-selected-text-not-index/12285/2 "2016-10-26T14:02:01Z")

</div>

Did you try the code snippet at the bottom of [the docs](https://docs.inductiveautomation.com/display/DOC79/List)? If so, what happened?

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [October 27, 2016, 12:20am UTC](https://forum.inductiveautomation.com/t/list-component-getting-selected-text-not-index/12285/3 "2016-10-27T00:20:35Z")

</div>

This works perfectly 🙂 Sorry, I’m still very new to Ignition 😊
