Forum Discussion

SarahGallagher's avatar
SarahGallagher
Community Member
3 months ago

Variables in Storyline

Hiya! I'm using the Articulate trial, and was hoping to get some insight to variables.

What I'd like to do, is for my slide's "next" button, to programmatically display the title of the slide it will navigate to onclick. (Or even just the title of the next slide.)

Is there a way to do this in Storyline?

Thanks for the help!

 

  • Hi Sarah,

    This is a tough one for me and someone else might have an exact solution. Mine is only partial.

    There is a built-in variable in Storyline for the title of the current slide. It is called  Menu.SlideTitle. However, what you want is to pull the SlideTitle of the next slide, so inserting this variable will not work.

    Perhaps someone could offer some JavaScript code to pull the slide title from the next slide in the menu listing and insert that into a variable you could put on your button.

    A partial solution might be if you had a series of slides with the same title followed by a number. For example, if your course was titled "Work Training," you could insert a numerical variable after the title and have that numeric variable increment with each slide. For example, you would type "Work Training" on a button. After that, you could go Insert>Reference and insert a variable you created called "Slide#". Set the default value of the variable to 1. Then you could put a trigger on each slide that Adjusts the variable by adding 1 to the variable when the timeline starts on each new slide. That way the button would show "Work Training 2" on the first slide (default value of 1 plus the 1 incremental value), "Work Training 3" on the second slide, etc.

  • I started down the same path as Kendal and discovered the same thing. I have a brute force answer for you.

    I created a button with a text variable called Next_Slide

    On each page that progresses to another page I added the button. Then added a trigger to adjust that variable to the name of the next slide when the timeline on the current page starts. It works and is not that cumbersome as long as you do not use "Jump to next slide" in the trigger, specify a slide.

    Adding this variable to your project would be the very last thing I did, not as you go.  See attached.