Creating a List Based on Learner Selections

Apr 15, 2019

I'm completely stumped on what I initially thought would be an easy thing to create. Here's what I need to do:

Learner is provided with 3 items - A, B, and C - and asked to select 2. 

Later in the course, the two items they select appear under a header and the item they don't select appears under a separate header.

I thought I could use a variable to pull text from the text boxes but based on what I'm reading text can only be pulled from text entry fields. I've tried using triggers and variables so that the selected items appear as images of the selected text and this works; however, if the learner selects A and C, for example, then there's a large space on the list. Also, getting the item they didn't select to appear separately is causing a problem as well.

Any ideas or suggestions would be much appreciated.

12 Replies
Stefano Craba

Hi Nadia,

I'm not sure if this will work but have a look at the att. file;

in the first slide I've placed three shapes A,B,C and added a selected state;

I've created a true/false variable for each of them; the variable toggle from false to true if the shape is selected;

in the second slide I've created the two header

on the top one I've piled all the possible combination  A B, or A C or B C, meaning 3 couples of two shapes on top of each other, initial states in hidden

on the bottom header there are 3 shapes on top of each other A,B,C again with initial states hidden;

then I've set up triggers to change states to normal depending on the value of the variables;

have a look at the files it will make more sense;

hope it helps

 

Ulises Musseb

In my version, I use layers. I imagine that you might want to add information, and layers provide a way of added real estate in the slides.

Also, I put a button to give the user the opportunity of changing their mind if they select two items.

Additionally, I restricted the user from selecting three objects. If they select two, and they try to select the third one, they have to deselect one of the other two in order for the other item to be selected.

I used true/false variables for the selection and deselection of the items, and a number variable to add and/or subtract as the user toggles the objects. The button becomes enabled only when the selection variable equals 2, which is the number of objects that can be selected.

The the button shows the correct layer based on the value of the variable being 2, and the state of the selected objects.

I hope this helps.

Ray Cole

These questions come up all the time on the forums here. The solutions above are clever work-arounds, but the real problem is that Storyline doesn't support string concatenation. I really don't know why. What I think people want and expect, and then are stumped when they discover the capability is missing, is to be able to set up a text variable and build a list of items slowly, one item at a time, by adding new items to the existing items, e.g:

List = List + ", " + New_Item; //Where List and New_Item are text variables.

This would allow you to build up a list of items easily, with no spaces, no layers required, and no need to work out every possible combination in advance.

Unfortunately, Storyline only supports assignment for text variables. We really need the "+" (concatenation) function too.

Phil Mayor

you can concatenate using javascript, here is an old example I built

https://360.articulate.com/review/content/f6b5b81d-be80-4b01-8d9b-25dfd3131823/review

The triggers are a bit of a mess as i originally built it to do something else and then changed it but instead of combining all the javascript in one function it is a few triggers.

I have also attached the file

Ray Cole

Hi Phil,

Thanks. To my way of thinking, javascript is another work-around. Yes, javascript can do it, but why is such a basic function still missing from Storyline proper? I don't want to use javascript for basic things like this. In fact, I prefer not to have to use it at all because when you do, you lose the very convenient ability to preview your project.

This discussion is closed. You can start a new discussion or contact Articulate Support.