How to restrict the submission of same survey if its already submitted by the user using the link send to them in email once incident is closed

bhavna6
Tera Contributor

How to restrict the submission of same survey if its already submitted by the user using the link send to them in email once incident is closed.

The survey is created using survey wizard.

20 REPLIES 20

bhavna6
Tera Contributor

Hi


This is not yet resolved.


But the client   agreed to query the database view created for task_survey table and remove duplicates from the report.


I'd highly recommend creating your own table & form for these survey's this will give you full flexibility to do what ever you need to do.


Setting up the table and form is fairly straight forward (I just added some styling to remove field labels in my example above)


You'll want to trigger an event from the INC (or where ever you want to trigger this from) checking the survey table for any existing survey's for the current user first.


Next send an email passing in any variables you want to carry to the survey form in a url link (in my case I passed the INC sys_id) e.g:


<a href="https://<your_instance>.service-now.com/nav_to.do?uri=<your_survey_table>.do?sys_id=-1%26sysparm_query=u_related_incident=${sys_id}">SURVEY LINK</a>



This part "%26sysparm_query=u_related_incident=${sys_id}" is only necessary if you wish to pass values to the form.


In this case I added the sys_id of the INC to a related field called "u_related_incident"



Extras...


Once they have completed the form you can setup another event to notify a group or manager that a survey has been completed once the survey has been submitted.


Reports can also be setup on the survey table.



If you need any further help with this please let me know.


Hi Darlly,



Thanks for the solution. But I have used wizard onload client script which will check for state of survey in "task_survey" table using GlideAjax.



If state will be completed then it will load an info message else it will display the corresponding survey.



Regards,


Preety.


Hi Preety,



Can you share how did you implement the onload CS on task_survey table?



Many thanks,


Ankita


Hi Preety,



Can you please share the script. We are also facing same issue and need to fix it soon.



Thanks in Advance!!