Pulling first name from LMS

Hi all - I'm wondering if anyone might be able to put together a step-by-step guide as to how to set up a variable / javascript function for this? (i.e. pulling a user's first name from the LMS).

I've read through this discussion (https://community.articulate.com/discussions/articulate-storyline/retrieve-lms-user-name-as-variable) but I'm very green and have had no experience with javascript functions (and only basic variables).

Any help for dummies would be amazing.

Thanks,

Sal

53 Replies
Kevin Brake

This may work, untested... let me know:

// Capture first initial from a variable
full_name = full_name.str.charAt(0);
first_name = first_name.str.charAt(0);

or maybe this one:

// Capture first initial from first and last name
var last_name = array[2];

first_name = first_name.substring(0, 1);
last_name = last_name.substring(0, 1);