My survey widget in servcicnow
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-14-2019 05:10 PM
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
- Labels:
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-14-2019 05:37 PM
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-14-2019 05:45 PM
I cloned the survey. But how can I filter on that cloned widget?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-14-2019 05:59 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-14-2019 09:34 PM
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.