How to show a variable as a %
Jan 11, 2016
By
Paul Rhodes
Hi,
I have created a personality questionnaire with 4 types.
- There are 80 statements (created using multi choose) and users select the statements they agree with.
- I have created a variable for each type of personality.
- I add 1 point to the variable if the user selects the certain statement that relates to the personality type.
- On the results slide I can see the total number of statements selected for each type. It looks like this %Type1% and this displays the number.
My question is this. Instead of showing the result as a number, I would like to show the result as a %. In excel it would look something like this =%Type1%/80 and they change the cell type to a percentage. Lets say %Type1% is 20 they then it would show 25%.
Is there a way of doing this in Storyline either by using the tools available or by using JavaScript?
Thanks in advanced.
4 Replies
Hi Paul:
As long as your %Tyep1% is a number variable you can do various math operations directly with triggers. These options do not appear if the variable is a TEXT variable. (see the attached image example)
Thanks Tracy,
When I do this the result displays 0.04, so its working but still displaying as a number not a %. Do you know how I would convert this?
Thanks
Paul
So if you added another trigger after the first (X/80) that next calculates X multiplied by 100 you will get the 4%.
You will then just have to diplay the variable as %variablename%%. The second % should show up as text.
Got it, thanks Tracy.
This discussion is closed. You can start a new discussion or contact Articulate Support.