In storyline, I try to add the value of a variable in a field (Short Answer survey question). But my problem is that I don't find the variable in Value List. But the variable exists when I click on X icon.
Hi Fredric , What is your variable???? Numeric or Text????
The only variable that a Short answer survey question would read, if it would be a text entry variable. otherwise it would not read it. Hope this helps.
You could convert the value using a JavaScript trigger to concatenate the values. But you can't combine one variable type to another variable type using the trigger interface. The JS below in a JS trigger would grab the text field variable and the number variable, then combine them and send it back into the text variable. Only caution here is this will permanently alter your text field variable. So repeatedly hitting the even that fires the trigger will result in adding the number again.
you can only assign variables to values of variables with the same type
OK But I have a numeric variable and I want to report it in storylineonline report. Have you got a solution. Beacause even if I use a numeric slide it does'nt work.
The value of a numeric variable isn't included in a a quiz results or reported to your LMS, and the only method to report the value of a variable to an LMS is detailed here, but this wouldn't work with a numeric variable.
The value of a numeric variable isn't included in a a quiz results or reported to your LMS, and the only method to report the value of a variable to an LMS is detailed here, but this wouldn't work with a numeric variable.
t needs to be a graded or survey question and needs to be assigned to your results slide
Thanks, But when I try to add the js trigger and I publish it on Storylineonline nothing happens... I've added the accurated variables...
Steve Flowers said:
You could convert the value using a JavaScript trigger to concatenate the values. But you can't combine one variable type to another variable type using the trigger interface. The JS below in a JS trigger would grab the text field variable and the number variable, then combine them and send it back into the text variable. Only caution here is this will permanently alter your text field variable. So repeatedly hitting the even that fires the trigger will result in adding the number again.
var player=GetPlayer();
var oBase=player.GetVar("firstPartText");
var oNumber=player.GetVar("secondPartNumber");
player.SetVar("firstPartText",oBase+" "+oNumber);
Steve Flowers said:
You could convert the value using a JavaScript trigger to concatenate the values. But you can't combine one variable type to another variable type using the trigger interface. The JS below in a JS trigger would grab the text field variable and the number variable, then combine them and send it back into the text variable. Only caution here is this will permanently alter your text field variable. So repeatedly hitting the even that fires the trigger will result in adding the number again.
10 Replies
Hi Fredric , What is your variable???? Numeric or Text????
The only variable that a Short answer survey question would read, if it would be a text entry variable. otherwise it would not read it. Hope this helps.
Thanks. It's a Numeric Variable. So have you got a solution for my problem.
you can only assign variables to values of variables with the same type
The only way is to match variable type
You could convert the value using a JavaScript trigger to concatenate the values. But you can't combine one variable type to another variable type using the trigger interface. The JS below in a JS trigger would grab the text field variable and the number variable, then combine them and send it back into the text variable. Only caution here is this will permanently alter your text field variable. So repeatedly hitting the even that fires the trigger will result in adding the number again.
var player=GetPlayer();
var oBase=player.GetVar("firstPartText");
var oNumber=player.GetVar("secondPartNumber");
player.SetVar("firstPartText",oBase+" "+oNumber);
OK But I have a numeric variable and I want to report it in storylineonline report. Have you got a solution. Beacause even if I use a numeric slide it does'nt work.
Hi Frederic,
The value of a numeric variable isn't included in a a quiz results or reported to your LMS, and the only method to report the value of a variable to an LMS is detailed here, but this wouldn't work with a numeric variable.
t needs to be a graded or survey question and needs to be assigned to your results slide
This discussion is closed. You can start a new discussion or contact Articulate Support.