I am using Captivate 11.0 and trying to capture user selections and then populate a feedback history in a text box. This is for a healthcare class in which the students select from a list of options to gather information and ultimatley make a decision. For example, if they click on "Medications" I have a text box with medication data display. I want to capture only the data for those items the user selects and save it to a variable so it can be reviewed later ("History" button) if the user needs to recall data from a previous slide.
Anyway, I am not having issues with any one variable, I simply haven't found a way or method to concatenate dynamic user selected variables and populate a text box. Maybe I'm just using the wrong tool for the job.
Can anyone help with a tip, example or provide simple direction? I'm lost.
You can insert multiple variables in one text container. Not really necessary to concatenate them.
Thanks for your reply. The problem is, I can't predict what items the user may select. Unless you are implying that I don't assign the variable until the user selects the specific item?
How do you present them? If you use a dopdown interaction, you can link it to a variables and te chose item will be stored in that variable.
Have a look at:
Or you can use the radiobutton interaction, also can be associated with one variable.
I am using buttons (10 Items). I am able to get the data to display, I just can't find a way to carry the data forward to another slide and use if the student wants to review prior history of their selections and the data that was revealed.
I'm currently updating to version 11.5 or I would include a screenshot.
Thanks for your help.
You need to store the choice in a variable. That is why I pointed to those interactions, much easier to store the chocieS. You could also use checkboxes interaction.
How to insert an display the value of a variable:
I appreciate your help and will try to provide a visual and more detail. I have always had the choices stored in a variable and I can get them to display (below is a screenshot of the specific slide). I am trying to carry forward (in one variable) the choices the student made on this screen so it can be referenced as they progress. Similar slides and options will follow as the student works through the simulation where they will continue to discover/gather other relevant information and make decisions based on the gathered info. Most students will likely select several of the items, not all. Only the options as they feel is relevant to the case scenario.
Concatenation (do not believe that will result in what you want) is simple done with the Expression command and the operator +.
Example: suppose having 4 variables:
v_name = has a name
v_surname = has a surname
v_space = just a space
These commands will concatenate the values of 3 variables and sore them in the last
Expression v_result = v_name + v_space
Expression v_result = v_result + V_surname
I am pretty sure not to understand what you really want.
That is exactly what I want to do (and I have tried). Unfortunately, I think I've reached the maximum string length of the variable. I'm not 100% sure but I found that a Captivate user variable has a maximum length of 250 characters. Am I correct? That may mean I will simply need to supply paper for the students so they can write down the data they feel is important and forget about storing historical data. Everything else is working as intended.
Indeed, the number of characters in a variable is limited. That was the reason I mentioned in one of my first answers that you can insert several variables in one text container.
I think I will have 40 distinct (information gathering) variables throughout this one scenario. So if I populate the text container with the variables (in the order they could possibly be selected), they will appear on subsequent slides when the user clicks a "Review History" butn? I think I'm following you. I did try that early on a few weeks ago, but when I clicked on Item #1, the variable text appeared at the top of the container and the next item clicked (#10) appeared at the bottom. I was hoping to list the items sequentially. Otherwise, I need to add a veritcal scroll bar to my container and I've never done that in Captivate.
I initially tried:
when item 1 was selected => v_History = v_History + v_item_1
when item 7 was selected => v_History = v_History + v_item_7
My goal was to build the list out, but I think I reached the variable string lenght limit. Needless to say, I will keep working on it and may try to use Actionscript 3 and Adobe Animate on my next project.
Perhaps it is not exactly what you are looking for but perhaps this is a fair compromise to get the desired look.
The idea is this - You can take your SmartShape that displays all the choices and list your variables inside.
Suppose my array is called histArray -LOL- and the student makes their first pick from the list.
That button will use the code histArray.push(pick1);
Then we make sure that our variables in the SmartShape are setup as such.
As many as you need.
I think you will still be limited to a character length but at least they will show up in order.
I think I will do an extended example of this and post it in the eLearning Community for you to check out and see if this will work for you.
Current is fine.
Indenting should not matter.
You would select the button on which to place the code.
just place the code in that little box.
If you tried to copy and paste - sometimes just the quotes need to be deleted and retyped in the box.
You will need to create the Captivate user variables to match.
It was the quotes that were messing with me. I appreciate your help. I will take what you've taught me and apply it to my project (manually typing and not copying & pasting).
I have done something - I think is similar - in two different ways.
In my scenarios - it is correct to say that the variable is not set until it is selected. Default values are at 0 for unselected and when the choice is made - the variable is set to a value of 1.
Here is link to a post I made a while ago that demonstrates this to some extent.
It is a chat training where you make choices with people avatars - your choices are given to you in the form of the avatar chosen on the results slide.
You can then click on each avatar for additional feedback about the choice.
Maybe it will spark some ideas for you.