Listing D&D results in categories (need Javascript?)

I have a challenge I am working on that I would be very grateful to hear how others would approach in Storyline. I am hoping I have not yet discovered a fantastic feature that’s going to save me lots of work! Or perhaps I am approaching this from completely the wrong direction?

Slide 1:

On a drag and drop I have 50 cards (drag sources) and 5 categories (drop targets).

If a card is dropped onto a category, a variable “var_card_X_category” is assigned the appropriate value  (e.g. if you drop card 1 on category 4 then var_card_1_category is assigned with the value 4).

Slide 2:

So now I have 50 variables (one representing each card), each with a value of 1, 2, 3, 4 or 5.

Each card also has a variable that contains its name. e.g. “var_card_1_name” has the text value “This is card 1”

On slide 2 I wish to create a text list of all the card names (var_card_X_name), grouped by their category (var_card_X_category).

Example of what would be displayed on slide 2:

Category 1

This is card 4

This is card 13

This is card 22

Etc

Category 2

This is card 1

This is card 5

This is card 17

Etc

Category 3

This is card 2

This is card 3

This is card 14

Etc

 

 

 

 

1 Reply