How to include the Ticket number to the Survey Title on survey form.

Test 123
Tera Contributor

I would like to include the Ticket number to the Survey Title on the Survey Form in the San Diego version.

I would like to get the ticket number as mentioned in the attached file. Please suggest me how to achieve this requirement.

find_real_file.png

 

5 REPLIES 5

Pedro Grilo1
Mega Sage

Hi!

 

Looking at the structure, there is a new behavior that involves calling an angular directive (sp-assessment-model) and passing the assessment data into it. Probably something was missed during the process change between versions.

I do not believe we have access to this directive.

Probably better, if you can, to log a ticket with ServiceNow support for this.

If you need a workaround, looking at the San Diego "Survey and Assessment" widget, we can see:

find_real_file.png

Basically, if the new method fails, use the old one.

You can clone the widget and apply to the take assessment portal page, and force it to use the old behavior by replacing the above code with just the "redirectToOldWidget()".

 

If ServiceNow fixes this you can then revert back to OOB.

 

I hope it helps!

 

Pedro

SusanWinKY
Kilo Sage

Hi @Test 123  - Were you able to figure this out?

 

We want to do this same thing. I figured out how to add the ticket info to the top of the widget, but because the widget auto focuses on the first question, that info is not visible unless the user scrolls up. For that reason, we, too, would like to be able to modify the directive to insert this information after the title, just before the first question. I'm thinking through alternatives like displaying the ticket # and a link in the breadcrumbs or adding another widget above the survey widget that holds the ticket info. Our goal is for the survey taker to remember the ticket they're taking the survey for, in case they get distracted or don't fully recall the details.

 

KB article for reference: https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB1156597

 

susanwinky_0-1677865387556.gif

 


Susan Williams, Lexmark

Hi Susan

Were you able to add ticket number/info in the widget.

 

Thanks

Prabhjot

Hi @Prabhjot Kaur4  Yes, we cloned the "Surveys and Assessments" widget (id = take_assessment) and added it to the "Take Assessment" page (id = take_assessment). I've attached our custom widget as XML.


Susan Williams, Lexmark