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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-16-2015 03:20 AM
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.
- Labels:
-
User Interface (UI)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-16-2015 04:23 AM
Can you provide a sample script?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-16-2015 05:13 AM
var gr = new GlideRecord("u_sys_eng_questionaire");
gr.addEncodedQuery("sys_created_onRELATIVEGT@dayofweek@ago@30^sys_created_by="+ String(current.caller_id));
gr.query();
if(gr.next()){
// User has filled out a survey in the last 30 days
action.setRedirectURL(current);
}
This was setup on a ui action from an incident form.
It calls the survey table and checks if the current user has filled out a survey in the past 30 days.
If it finds an entry it returns to the incident but you can redirect to where ever you like or open a message dialog.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-16-2015 05:15 AM
We had an email sent to the user from this if there was no record found. So they only got the email if they hadn't already done the survey.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-16-2015 05:16 AM
What are your triggers for the survey? Is it possible to have this check on the save ui action if the survey is related to a specific record type i.e: CHG, PRB, INC etc...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-16-2015 05:19 AM
We are sending the survey to the user once the incident is closed.
So user will be receiving an email with the link for survey.
Once he clicks on the link he can take up the survey.
The issue we are facing is that if the user clicks on the same survey link from email he can take up the survey again.
So we need to restrict this retake of survey if he has already taken one.