0

Background:

I have taken on the task of creating an anonymous suggestion submission/response system for my workplace. I have implemented this system using two SharePoint apps: a survey and a custom list.

The survey is used to collect anonymous suggestions. It has its "Show user names in survey results?" setting set to "No". It also has a question called "What is your suggestion?" that accepts a multi-line text response.

The custom list is used by my management to issue responses to suggestions submitted via the survey. This list has two main fields. The first is a lookup field that allows a member of management to link a response to a specific survey entry (via the entry's ID). The second is a multi-line text field that allows them to write a response to the linked suggestion.

Issue:

My issue is that I would like to set up an automated email reminder system, but I am not sure how to accomplish such a thing.

Ideally, I would like to set up a system where, after new submissions are made to the survey, a 7 day timer begins. After the timer elapses, it checks if anything in the Management Responses custom list has been linked to it. If no such items can be found, it sends an email to management to remind them to respond to the suggestion.

My guess is that a workflow may be able to accomplish this, but I am not sure how to create such a workflow.

Edit:

My workplace's site currently uses SharePoint 2013, but will eventually be migrated to SharePoint Online.

4
  • Is this SharePoint on-prem (and if so, what version), or O365?
    – Tracy
    Jul 10, 2020 at 21:13
  • I think you cannot start workflows on a survey list:sharepoint.stackexchange.com/questions/232240/….. Is a code based solution fine? Jul 11, 2020 at 9:17
  • @Tracy Sorry, I should have specified in my post. It is currently SharePoint 2013, but I expect our site to be migrated to SharePoint Online sometime in the next year or so.
    – petereg
    Jul 11, 2020 at 23:07
  • @SOURAVMUKHERJEE Yes, I think a code-based solution would work.
    – petereg
    Jul 11, 2020 at 23:11

1 Answer 1

0

Since we cannot have workflows in survey lists, we can use an an event receiver and a timer job for this.

  1. Create a list called "ResponseController", having fields:

    (i) SurveyID (type number): to store the unique id of the survey

    (ii)RespondedToSurvey(type drop down: Yes/No): to store if someone responded to this.

  2. Break inheritence to the list , and remove permission of all except a select few admins and service accounts.

  3. Add a event reciever to the survey list such that when the survey is completed. an entry is made in the ResponseController list and RespondedToSurvey selected to No.

  4. Set up a timer job which runs every night with the following logic in the execute method: (i)check the ResponseContoller for entries with RespondedToSurvey="No"

(ii)For these items: check the custom list for Management Response to see if anyone has responded

if(yes)

    update the RespondedToSurvey="Yes"
else

  check :

    if(it has been more than 7 days since this survey was created)

        Send them an email

    else 

       do nothing

References

Timer Jobs: https://www.c-sharpcorner.com/UploadFile/b8e86c/how-to-create-timer-job-in-sharepoint-2013/

Special Note for adding an event receiver to a survey list: https://amalhashim.wordpress.com/2013/08/02/sharepoint-survey-list-eventreceiver/

Sending emails using SMTP: https://docs.microsoft.com/en-us/dotnet/api/system.net.mail.smtpclient?view=netcore-3.1

Since you are migrating to SharePoint online , you can convert this into a remote event reciever and a remote timer job:

Remote event reciever:

https://docs.microsoft.com/en-us/sharepoint/dev/solution-guidance/use-remote-event-receivers-in-sharepoint

Remote timer job:

https://docs.microsoft.com/en-us/sharepoint/dev/solution-guidance/create-remote-timer-jobs-in-sharepoint

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.