Generate System Date in Articulate Storyline Using Java Script

Generate System Date in Articulate Storyline Using Java ScriptAre you facing trouble to generate a system date in Articulate Storyline? No problem, for this purpose we use Java Script. Articulate Storyline has a feature to execute Java Script. This is also one of the main reasons why Articulate Storyline is becoming popular.

In this blog, I will share how the system date can be generated in Articulate Storyline using Java Script.

First, you should know how to execute Java Script in Articulate Storyline.

To execute java script, first open a trigger wizard and click on “Execute JavaScript”.

Creating a trigger to execute Java Script

Click on the “Add/Edit JavaScript” button to write a script.

Openening a window to write a script

Then an empty window will open for you to write your Java Script.

Showing an empty window

Here you should take a text variable with empty value as default.

Creating a Text variable

Then you should add the code as mentioned in the screen below to generate the system date.

Showing a window with Java Script

In the above code, I have used the variable “SystemDate” that I created earlier.

Now you will need to decide when we want the Java Script to be executed. Here I am executing the Java Script when the timeline of the slide begins.

Displaying the variable and Executing the Java Script

Now you should place the text variable “SystemDate” within “%” symbols to display the system date that I have mentioned in the above screenshot.

Once the coding part is completed, we need to check the output. We will not be able to watch the output of the Java Script while previewing the file. So, we need to publish it, so that we see the outcome of Java Script. Once we publish, the output of the code is displayed as shown in the screenshot below.

Final Output

By utilising this Java Script feature in Articulate Storyline you can make your elearning courses dynamic by adding the current date to certificates. Don’t you think this feature is useful?

Click here to see how this works.

Change your system’s date and click on the link and it will show the changed date. It means no matter when you click on this link, you will see the date that is there on your system. Isn’t that great!

View eBook on Articulate Storyline for Building E-learning Courses