Unable to pull student names from Workday Learning LMS

Hi all, 

I've read through all the lms name pulling discussions but I still have no luck pulling the student name correctly in Workday Learning. I was wondering if anyone is using Workday Learning LMS and was able to utilize the name pulling codes successfully? I think I got the Workday Learning to talk back (sort of) because my first and last name would display as "Learner Workday" and the codes are definitely working as intended (pull my real name) when I tested in SCORM Cloud. 

The codes I am using are as following. Could anyone provide any more insights on Workday Learning lms? Thank you!  

function findLMSAPI(win) {
if (win.hasOwnProperty("GetStudentID")) return win;
else if (win.parent == win) return null;
else return findLMSAPI(win.parent);
}

var lmsAPI = findLMSAPI(this);
var name = lmsAPI.SCORM2004_GetStudentName();

var nameArray = name.split(", ");
var firstName = nameArray[1];
var lastName = nameArray[0];
var fullName = firstName + ' ' + lastName;

var player = GetPlayer();
player.SetVar('first_name', firstName);
player.SetVar('last_name', lastName);
player.SetVar('full_name', fullName);
2 Replies