Forum Discussion
Sorting and Organizing Lists
This sample allows the learner to sort a list into two categories, then shows the lists without blank spaces. Because it relies on JavaScript, you need to publish it to preview it, or you can view it here: https://s3.us-east-2.amazonaws.com/walt.hamilton.portfolio/Sort+Variables+-+Storyline+output/story.html
- SamHillSuper Hero
Hi Walt, this looks good, but I do get a weird behaviour as I move down the list. Eventually I'm able to select Yes/No for a single item, and selecting items towards the bottom of the list starts de-selecting items at the top.
Check this out: https://www.dropbox.com/scl/fi/7wmcbwyt5wzviexb7ahx8/2024-03-12_16-02-21.mp4?rlkey=1ncl2zfom4gnctqw10ohz2hk1&dl=0
- WaltHamiltonSuper Hero
Sam, thanks. A last second change messed up the button sets.
I've fixed it now.
- SamHillSuper Hero
Clever, I like it.
- VishakhaHegde-0Community Member
Hi Walt! Thank you for sharing the .story file. Really cool setup. I am trying to build an activity where there are 43 cards to be sorted into 5 categories and the slides ahead display the results visually.
Slide 1 - Visual Setup: 43 rectangles (with text on them) stacked behind one another and 5 rectangles representing the 5 categories. To keep this simple, I'll name the cards as card1, card2..and the categories as mostImportant, extremelyImportant, very important, somewhatImportant and notImportant.
Submit button
Slide 1 - what's happening: Drag and drop activity is completed once learner submits activity using the button and jumps to the mostImportantDisplay slide. Also, there is a limit on how many cards go into each category (9 to be precise).
Slide 2 (mostImportantDisplay) - Visual Setup: 9 placeholder rectangles which each display the content of the cards sorted into this category. So card 4, card 6, card 15, card 22, card 26, card 33, card 40 and two blank rectangles because let's say only 7 were sorted into this category.
Slide 3 (extremelyImportantDisplay) and so on with the results' slides in Slide 4, Slide 5 and Slide 6.
Can this be done using Storyline and Javascript? Maybe recording all the drop events using Javascript and setting up a trigger for the submit button. Also then pushing objects into arrays and then accessing each of the arrays individually and assigning them to storyline variables. And then changing the states of the rectangles on the results' slide to match the values held by the storyline variables. Would really appreciate any help or direction with this one.
Thanks,
Vishakha Hegde