user
@ashleystopp
Using a text variable and today's date in downloadable certificate PDF
In my Storyline project, I am aiming to have the learner download a Certificate PDF using today's date and their name (text variable). Am I able to use ClueLabs to input this information? Any tips on how to position this information within the PDF?
reply
Reply
user
@support
Hello,

The easiest way is to mock up the certificate in Google Docs and then use that document as a template. You place variables on the certificate in the format %variable%. So, for example, if your Storyline variable with the learner's name is called learner_name, you can place the text %learner_name% on the certificate in Google Docs. This placeholder will be replaced with the actual text value from Storyline when the learner downloads the certificate. And same with the date.

When you save your PDF widget, you will receive instructions on using it in Storyline. And, of course, feel free to reply below if there are any specific questions.
reply
Reply
user
@ashleystopp
That is INCREDIBLY helpful, thank you.

Is there a way to auto-source the date instead of requesting that the learner inputs it themselves?
reply
Reply
user
@support
You can use JavaScript to get the current date. Here's a guide to JavaScript data object: https://www.w3schools.com/jsref/jsref_obj_date.asp

So, in Storyline, you would create a variable "today" and do something like this:
let player = GetPlayer();
let today = new Date();
player.SetVar('today', today);

reply
Reply
user
@ashleystopp
I gotcha! Thank you for getting back to me so quickly!

Last question - how do I enforce where I want the date to appear on my certificate PDF in Google Docs?
reply
Reply
user
@support
Just like you are using the %% notation for the learner's name variable, you will do the same with the date variable. So, for example, if the variable you created in Storyline is called "today," you will use the placeholder %today% in the certificate to reference this variable.
reply
Reply
user
@ashleystopp
Hello again! Follow-up question. Thanks to your help, I was able to successfully generate my PDF from Storyline. That said, I've just learned that the majority of my company uses a VPN that blocks Google Docs. Any workarounds here? We use SharePoint, but when I tested it with a SharePoint file, it didn't work!
reply
Reply
user
@support
Hello. SharePoint is not a option, but we are evaluating allowing to upload a template Word file instead of using Google Docs. That could be an option for you in the future. For now, the only other option you have is to mock up the document using the text field provided instead of using Google Docs.
reply
Reply
user
@ashleystopp
That's so wonderful to hear! Is there any chance you have a timeline regarding allowing the ability to upload a template Word file instead of using Google Docs?
reply
Reply
user
@support
It looks like it will be launched in early March. You should get notified once this option is available.
reply
Reply
user
@support
Hello. Just wanted to let you know that the option to upload a Word file template for the PDF is now available. Note that it's in beta - please let us know if you encounter any issues. Thank you!
reply
Reply