How to include the Ticket number to the Survey Title on survey form.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-04-2022 02:56 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-04-2022 09:08 AM
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:
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-03-2023 09:48 AM
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
Susan Williams, Lexmark
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-04-2024 02:34 AM
Hi Susan
Were you able to add ticket number/info in the widget.
Thanks
Prabhjot
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-04-2024 12:28 PM
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