Forum Discussion
LMS Course Name JavaScript Action
It looks as though I'd need to be a customer to access ESR documentation, but it sounds like since you are likely running this Rise course within the ESR environment, classroomName() is a function that 'lives' at the parent/global level, which is why it's working in your browser's console window. If that classname is itself an ESR global variable, is that what you plugged into classroomName( ) to get a result? Javascript in a Rise trigger should be able to access that same 'parent' function. Maybe send a screen shot (redact stuff if necessary) of your console with classroomName returning what you wanted.
Hopefully this shows what you need ?
the value that it returns is correct and the current JS i am using to modify the project variable is what was supplied previously;
var player=GetPlayer();
var externalCourseID = classroomName;
player.SetVar("CourseName", externalCourseID);