Announcing the Global SNUG Board of Directors. Learn more here

Help
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

My survey widget in servcicnow

Black Coder
Tera Guru

in service portal we have defined "My survey" widget. Here what the need is we need to get only request and incident surveys. Other than that i dont need any other kind of surveys. But currenlty apart from request and incident surveys ,we are getting some other surveys on that widget. So we dont want any other surveys to be displayed when it was triggered. We need only Request and incident survey.

So how can we achieve this

6 REPLIES 6

Ankur Sharma
Tera Guru

Hi Faiq,

The out-of-the-box 'My Surveys' widget displays all surveys.You will need to clone the widget and make changes to filter surveys on certain table.

 

Let me know if it helps.

I cloned the survey. But how can I filter on that cloned widget?

You will need to update the function as highlighted. It can be found in Script Include 'sn_portal_surveys.SPSurveyAPI'.

find_real_file.png

 

I raised the question on HI portal regarding this. They gave a idea to modify query on SPSurveyAPI. Here I give their response on it

(When looking into the script include, there is a GlideRecord query which is running on the "asmt_assessment_instance" table. The GlideRecord query begins on line 46. Within the "asmt_assessment_instance" table, there is a possible way of constraining the returned results further by adding an additional query which checks if the task begins or contains "REQ" and "INC" for incidents and requests.)

Above statement is their response. But I tried the query to get Request Surveys based on their suggestion. But I am getting nothing on widget. It doesnt work. I atteched screnshot of the code of SPSurveyAPI.