Forum Discussion
AndrewRost
13 years agoCommunity Member
Retrieve LMS User Name as Variable
I know you can have a user fill in a text box with their name and then later use that variable for personalization. What we would like to do is programmatically retrieve the user name from the LMS....
VincePileggi1
12 years agoCommunity Member
Hi all,
I am trying to pull information from the LMS and save into Storyline variables. To start off, I'm trying to grab the user's name. I used the Javascript code shown in this thread but it doesn't work for me.
var player = GetPlayer();
var myName = lmsAPI.GetStudentName();
var array = myName.split(',');
var newName = array[1] + ' ' + array[0];
player.SetVar("newName", newName);
Do I have to change something based on the particular LMS I'm using? What could be the problem?