# Ignition Strings

**URL:** <https://forum.inductiveautomation.com/t/ignition-strings/5201>\
**Category:** Ignition\
**Created:** [September 26, 2012, 6:53pm UTC](https://forum.inductiveautomation.com/t/ignition-strings/5201 "2012-09-26T18:53:49Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![saltykarp](https://avatars.discourse-cdn.com/v4/letter/s/65b543/32.png) [@saltykarp](https://forum.inductiveautomation.com/u/saltykarp)\
**Post date:** [September 26, 2012, 6:53pm UTC](https://forum.inductiveautomation.com/t/ignition-strings/5201/1 "2012-09-26T18:53:49Z")

</div>

When I input a string into a text field, how can I put that in a visible scrolldown list in the same screen? And when I update my text field, the new string will be into that list also.

i.e.  
Text Field: 1234 List shows: 1234

Text Field: 5678 List shows: 1234  
5678

Text Field: abcd List shows: 1234  
5678  
abcd

Please help. Lets say the text field has a tag called “field”. How would I transfer field and each new string of field into the list. Would I use a text area, chart, or scroll down list? Sorry, am new to this.

---

<div class="post-metadata">

**Author:** ![James.Lorenz](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/james.lorenz/32/3290_2.png) [@James.Lorenz](https://forum.inductiveautomation.com/u/James.Lorenz)\
**Post date:** [September 26, 2012, 7:00pm UTC](https://forum.inductiveautomation.com/t/ignition-strings/5201/2 "2012-09-26T19:00:19Z")

</div>

This again is probably best handled with a tag change script, that appends data to the dataset for the “dropdown list” component (found under the “input” tab of the component palette). For more information about dropdown lists and working with datasets:

[inductiveautomation.com/support/ … mbobox.htm](http://inductiveautomation.com/support/usermanuals/ignition/input_pmicombobox.htm)  
[inductiveautomation.com/support/ … atatyp.htm](http://inductiveautomation.com/support/usermanuals/ignition/working_with_different_datatyp.htm)

---

<div class="post-metadata">

**Author:** ![saltykarp](https://avatars.discourse-cdn.com/v4/letter/s/65b543/32.png) [@saltykarp](https://forum.inductiveautomation.com/u/saltykarp)\
**Post date:** [September 26, 2012, 9:29pm UTC](https://forum.inductiveautomation.com/t/ignition-strings/5201/3 "2012-09-26T21:29:03Z")

</div>

Can you give me a snipet of code as example to get started?

---

<div class="post-metadata">

**Author:** ![James.Lorenz](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/james.lorenz/32/3290_2.png) [@James.Lorenz](https://forum.inductiveautomation.com/u/James.Lorenz)\
**Post date:** [September 26, 2012, 9:50pm UTC](https://forum.inductiveautomation.com/t/ignition-strings/5201/4 "2012-09-26T21:50:31Z")

</div>

Well, the scripting function system.dataset.addRow() has a nice example, and is a direct example of how to append to a dropdown list’s dataset:

[inductiveautomation.com/support/ … addrow.htm](http://inductiveautomation.com/support/usermanuals/ignition/system_dataset_addrow.htm)

As a reminder, if you’re using this in a tag change script, you’ll need to reference the component of a window using system.gui.getWindow(), and the window being referenced using getWindow() has to be open at runtime for the script. For more information about working with components:

[inductiveautomation.com/support/ … onents.htm](http://inductiveautomation.com/support/usermanuals/ignition/working_with_components.htm)
