How to add Short Description to the Survey widget?

Happy S
Tera Expert

Hi,

 

I am trying to add a Short Description field to the Survey widget on the ServiceNow portal.

 

By referring to this - https://www.servicenow.com/community/it-service-management-forum/how-do-i-add-short-description-fiel... after adding the code below

 

-----------------------------------------------------------------

body += '<span style="color:#000; white-space:normal;">' + 'ShortDescription' + ': </span><span style="color:#595959; white-space:normal;">' + data[id].inst_description + '</span><br/>';

-----------------------------------------------------------------

 

It is returning the value of the Short Description which is the Name of the Survey widget - Customer Satisfaction Survey and not the Short Description of the Incident ticket.

Joe999_0-1672291658654.png

Appreciate if someone can help with the mentioned code above to have the Short Description value of the Incident ticket being populated instead.

 

Thank you.

8 REPLIES 8

RaghavSh
Kilo Patron

Try below:

body += '<span style="color:#000; white-space:normal;">' + 'ShortDescription' + ': </span><span style="color:#595959; white-space:normal;">' + data[id].task.short_desciption + '</span><br/>';


Please mark the answer correct/helpful accordingly.


Raghav
MVP 2023
LinkedIn

Community Alums
Not applicable

Hi @Happy S ,

If you are using the assessment_take2 page then there is no Out Of Box way to achieve this currently in our platform but here are some Community Articles that might lead you in the right direction: https://community.servicenow.com/community?id=community_question&sys_id=71904b25db98dbc01dcaf3231f96...

If you plan on using Surveys in the Service Portal, this is currently supported in our Out Of Box instance. This comes from the take_survey widget.

https://docs.servicenow.com/csh?topicname=c_SurveyServicePortal.html&version=latest

 

SanaPR
Giga Guru

Hi,
Did you find a solution for this ?  I have a similar requirement and can't seem to find a working solution anywhere in communities. The URLs provided are not accessible anymore. The code solutions provided are not clear on where to add what to achieve this.
Can you please post the solution you found or paste the code you used to modify OOTB or otherwise ?
Thank you!

 

hi @SanaPR,

 

I added the code below into the Client Script under the assessment_list in the UI page table.
------------------------------
body += '<span style="color:#000; white-space:normal;">' + DescMsg + ': </span><span style="color:#595959; white-space:normal;">' + data[id].task_short_desc + '</span><br/>';
------------------------------

This will populate the Short Description of the Incident ticket.