# Dynamic Text, Data Type, Variable Problem

**URL:** https://forum.kirupa.com/t/dynamic-text-data-type-variable-problem/97461
**Category:** Uncategorized
**Created:** [December 22, 2003, 7:28pm UTC](https://forum.kirupa.com/t/dynamic-text-data-type-variable-problem/97461 "2003-12-22T19:28:15Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![jugglerpm](https://avatars.discourse-cdn.com/v4/letter/j/87869e/32.png) [@jugglerpm](https://forum.kirupa.com/u/jugglerpm)
#### Post date: [December 22, 2003, 7:28pm UTC](https://forum.kirupa.com/t/dynamic-text-data-type-variable-problem/97461/1 "2003-12-22T19:28:15Z")

</div>

I am trying to load one of 80 text fields into a dynamic text box. I have an Array that is filled with all 80 field labels in random order. My concept is that I should be able to pop the last field out of the array, set it equal to a variable, and use that variable in the statement defining the text of the text box. But it doesn’t work. It returns undefined.

Example:

[AS]nextQuestion = myList2.pop();  
myTextField\_txt.text = externalData.nextQuestion;[/AS]

The second line of the statement works if I hard code the text field name.

Example:

[AS]myTextField\_txt.text=externalData.question37;[/AS]

But it does not work if I use a variable set to question37.

I think this may have to do with the data type of the variable. It is a string. Any ideas or suggestions?
