# Ui string problem

**URL:** https://forum.code.org/t/ui-string-problem/35960
**Category:** Coding and Debugging Help
**Created:** [March 2, 2022, 3:08pm UTC](https://forum.code.org/t/ui-string-problem/35960 "2022-03-02T15:08:18Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![smcgilvra](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.code.org/smcgilvra/32/7339_2.png) [@smcgilvra](https://forum.code.org/u/smcgilvra)
#### Post date: [March 2, 2022, 3:08pm UTC](https://forum.code.org/t/ui-string-problem/35960/1 "2022-03-02T15:08:19Z")

</div>

I have a student getting the error, “WARNING: Line: 39: setText() text parameter value (undefined) is not a uistring.ERROR: Line: 39: TypeError: Cannot read properties of undefined (reading ‘toString’)”I’m not sure why all of them are getting the error. Can you help?

> **[Check out what I made](https://studio.code.org/projects/applab/Z2vSfXh6p9XBZ5Kt-ZmW3O1lss-WHqhUW4iBuZIO2nc)**
>
> I wrote the code myself with Code.org

---

<div class="post-metadata">

### Author: ![jdonwells](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.code.org/jdonwells/32/7900_2.png) [@jdonwells](https://forum.code.org/u/jdonwells)
#### Post date: [March 2, 2022, 3:31pm UTC](https://forum.code.org/t/ui-string-problem/35960/2 "2022-03-02T15:31:58Z")

</div>

Here is your first clue:  
 ![image](https://us1.discourse-cdn.com/flex016/uploads/codeorgforum/original/2X/e/e0a5766e16393f46571d5a7c68e368b4d65f1195.png)  
What does the dogs function do? Why does it need to use the size variable in some way?There is an attempt to not need size. We have `if (breedGroupList[i] == "toy") {`. Let’s try an experiment.  
 ![image](https://us1.discourse-cdn.com/flex016/uploads/codeorgforum/original/2X/1/1185d3e6b2d7d8448bcd4dfc8e29b1b6efbc4901.png)  
“Toy” and “toy” are not equal. Which one of those two is in the database?

For your second clue let’s try some simple code:  
 ![image](https://us1.discourse-cdn.com/flex016/uploads/codeorgforum/original/2X/2/27566c12977909a28b9ec51e24a426b2452d2464.png)  
Now let’s run it:  
 ![image](https://us1.discourse-cdn.com/flex016/uploads/codeorgforum/original/2X/5/5ad61f24722e6266d553f1e5529cc4232450469f.png)  
We get undefined. Does that sound familiar at all?

Recap those two clues. Trying to get something from an empty array returns `undefined`. “toy” is not in the database. What is wrong?

---

<div class="post-metadata">

### Author: ![smcgilvra](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.code.org/smcgilvra/32/7339_2.png) [@smcgilvra](https://forum.code.org/u/smcgilvra)
#### Post date: [March 3, 2022, 2:56pm UTC](https://forum.code.org/t/ui-string-problem/35960/3 "2022-03-03T14:56:28Z")

</div>

Once I changed it to “Toy” it worked. Thanks.
