assigned to name on survey

Brian Lancaster
Tera Sage

Does anybody know if there is a way to display the assigned to name of the survey.   I have a requirements where they want to add more questions to the survey but at the top they want an into on who the assigned to was.   See screenshot below.

survey.png

11 REPLIES 11

Tim Woodruff
Mega Guru

I think I'm going to need a little more info on like.... where you're trying to do this and where you want this to happen.


The screenshot looks like you've already got it implemented. Is that just a mock-up?



I can tell you that you can embed JS into the field headers on a survey, like:


javascript:gs.getUserName();


If that's not what you're looking for, please let me know some additional details about this.


The screenshot is a mock-up.   Right now our survey has two questions.   They want to add the question right below the existing ones along with who the tech was.   So this would be displaying on the survey just above the questions about the tech but below the existing two questions.


Also wouldn't javascript:gs.getUsername(); pull the name of the person currently logged in to the survey and not the person who closed the incident for example.   that is what we wan't to display the name of the user who resolved the task that the survey is for.  


ah, I understand. When you said "display the assigned to name of the survey" it sounded like you meant the person assigned to the survey - the person filling it out. but you're asking about getting the person assigned to the incident the survey is on, right?



If so, you can include that information as a URL parameter by appending "&agent=agent_name" to the URL when you construct the survey link wherever these are being generated from. Then, you can include it as a default value or a string in a section header or something like that, by doing:



javascript:RP.getParameterValue("agent")


(no semicolon, and don't omit the "javascript:" at the beginning.)