0

There is a meeting that occurs every week, but has a rotating list of members. So one person from each department goes one week, and the next week it is a different person from each department, and so on.

Right now I have 2 SharePoint lists set up, one for the current week’s schedule (which has a column for each department, and one name in each column), and another that has the complete list of names (where each column is a department, and in those columns are the names of the people in that department).

I have JavaScript on the page with the current week’s schedule that runs when the page loads. This does a few things.

  • Checks if the current schedule is out of date (it’s an if statement that will evaluate true every Monday morning.)

    • If the current schedule is out of date, then it takes the names in the current (now outdated) schedule, finds them in the second list which contains all the names, gets the next name for each department, and updates the list items in the current schedule with the new names. This is all done using the SharePoint REST API (it makes AJAX calls for creating and deleting list items)
    • This ends the “if” statement, and the rest of the code runs as usual
  • If schedule is up to date, it then takes the names in the current schedule and looks them up in the second list with all the names. It then populates a table that goes 14 weeks into the future with what the schedule will be for each week.

What I need to do now is to have the system send an email every Monday morning to the people who have to attend the meeting that week. I thought maybe I could use a SharePoint workflow to send the email, but I ran into a problem. I can set up a workflow to email the names in the list just fine, and have it wait and do it every Monday morning. But the problem is that the list itself only updates when the page is loaded, since all the code for the updating is JavaScript which can only be run when the page is loaded. So if the page isn’t loaded on Monday, then the list won’t get updated, and it will email the old people. If someone manually loads the page before the email would be sent, then everything would work fine. Right now I am trying to figure out the best way to automatically update the list (without having someone visit the page every week) and then send the email.

  • Seems like you could do something with Information Management policies on the list(s) in question that may actually obviate the need for your javascript and REST stuff. Let me play around on my sandbox, and I'll see if I can come up with a workable example. – ChrisPEditor Sep 3 '15 at 18:47
0

you can create a timer job to send emails every week .

We're looking for long answers that provide some explanation and context. Don't just give a one-line answer; explain why your answer is right, ideally with citations. Answers that don't include explanations may be removed.

  • Please elaborate your answer by giving a longer insightful answer. Thank you – Benny Skogberg Sep 5 '15 at 5:22
  • I've already looked into timer jobs, but unfortunately I do not have admin rights for sharepoint so I'm looking for other alternatives. I've been able to set up a workflow to email the users set up for the current week, but I still need a way to refresh the list each week before sending out the email. Right someone still has to manually load the page, then everything is taken care of from there. – Zach Sampieri Sep 8 '15 at 12:40

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.