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.
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.
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 ].