# I need help with this program a student sent me, the part where it should show data is not showing up and we are stuck trying to figure it out

**URL:** <https://forum.code.org/t/i-need-help-with-this-program-a-student-sent-me-the-part-where-it-should-show-data-is-not-showing-up-and-we-are-stuck-trying-to-figure-it-out/39323>\
**Category:** Coding and Debugging Help\
**Created:** [April 18, 2024, 5:18pm UTC](https://forum.code.org/t/i-need-help-with-this-program-a-student-sent-me-the-part-where-it-should-show-data-is-not-showing-up-and-we-are-stuck-trying-to-figure-it-out/39323 "2024-04-18T17:18:33Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![arizelle.parker](https://avatars.discourse-cdn.com/v4/letter/a/7ab992/32.png) [@arizelle.parker](https://forum.code.org/u/arizelle.parker)\
**Post date:** [April 18, 2024, 5:18pm UTC](https://forum.code.org/t/i-need-help-with-this-program-a-student-sent-me-the-part-where-it-should-show-data-is-not-showing-up-and-we-are-stuck-trying-to-figure-it-out/39323/1 "2024-04-18T17:18:33Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![sgaraas](https://avatars.discourse-cdn.com/v4/letter/s/97f17d/32.png) [@sgaraas](https://forum.code.org/u/sgaraas)\
**Post date:** [April 18, 2024, 8:25pm UTC](https://forum.code.org/t/i-need-help-with-this-program-a-student-sent-me-the-part-where-it-should-show-data-is-not-showing-up-and-we-are-stuck-trying-to-figure-it-out/39323/2 "2024-04-18T20:25:33Z")

</div>

The way the code is working, they are adding a new entry into each of the selected lists without ever clearing it. Due to this, the data that they would want to get will always be the last index in each of the lists. Doing the parseInt() on the dropdown isn’t giving the correct index.

There is also an issue with the size of the labels. The labels are too small and so you cannot see all the text. In the designer, they will have to increase the width.

![updated updateScreen](https://us1.discourse-cdn.com/flex016/uploads/codeorgforum/original/2X/c/ca9dc830719d9b33c3e157be2be06fc41ade2bfd.png)

---

<div class="post-metadata">

**Author:** ![arizelle.parker](https://avatars.discourse-cdn.com/v4/letter/a/7ab992/32.png) [@arizelle.parker](https://forum.code.org/u/arizelle.parker)\
**Post date:** [April 23, 2024, 12:55pm UTC](https://forum.code.org/t/i-need-help-with-this-program-a-student-sent-me-the-part-where-it-should-show-data-is-not-showing-up-and-we-are-stuck-trying-to-figure-it-out/39323/3 "2024-04-23T12:55:48Z")

</div>

How does one go about parsing the index as an integer? I have increased the text box size and added an else statement. Still, it is not displaying the wanted data.

---

<div class="post-metadata">

**Author:** ![sgaraas](https://avatars.discourse-cdn.com/v4/letter/s/97f17d/32.png) [@sgaraas](https://forum.code.org/u/sgaraas)\
**Post date:** [April 23, 2024, 1:17pm UTC](https://forum.code.org/t/i-need-help-with-this-program-a-student-sent-me-the-part-where-it-should-show-data-is-not-showing-up-and-we-are-stuck-trying-to-figure-it-out/39323/4 "2024-04-23T13:17:59Z")

</div>

What output are you expecting and what are you currently seeing?

I’m not sure I fully understand what you mean about parsing the index as an integer.  
The index is already an integer if you take the length of the list - 1 it will be the last item in the list.

I do realize now that the code in the image is slightly wrong. The “medLabel” should say selMedInc[index].
