Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Who Me Too'd this topic

Avatar

Level 2

Using LCD 8

Want to populate one dropdown list - with up to 24 items - based on a radio button selection.

If RBG== 1, then display dropdown list with values pertaining to value "1".

I have the dropdown list working.

(rinse and repeat)

However, I have coded each 'addItem' with a value.

So, if I have 3 radio buttons - I code for 72 different 'addItems'.

There is also a very good chance that some selections will only result in 3 values - where as other selections may yield 12 or 24.

I want to use global variables as an array (I think) and then be able to loop through these variables and populate the dropdown list with each pass of the loop.

This reduces the code from '72 lines' to 'very few lines').

The variable values for each RBG value are set in a script object.

  • How do I use/declare an array for my variables??
Who Me Too'd this topic