Hello everyone and happy 4th if you are in the states!
Complete workflow newbie in need of some assistance. We have SharePoint 2013 and Nintex Workflow designer 2013. I have some programming experience from school, so I’m familiar with the basic concepts at play here like for loops, if then else, variables etc. I know my way around SharePoint for the most part, I’d say I’m not quite intermediate level but getting closer every day so I didn’t think this would be terribly difficult but I’m having some trouble wrapping my head around structuring this.
We have a custom list that is used to track reports, who is responsible for generating/sending them, when they are due, and when the report was in-fact submitted by an employee.
My boss has asked if it is possible to build a workflow or two to generate some reminders about when reports are due. These reminders would be generated based on two criteria:
- When any report in the list is <=7 days away from the due date, email responsible staff (single email sent per report due).
- Every 1st of month generate a single email with a list of all reports due that month and send to all responsible staff that have a report coming up listed in the email (hope that makes sense).
This is where I’m at with trying to build the first workflow:
1) Using a List Query, go through the entire list filtering for anything WITH a due date set and WITHOUT a submission date set. Any row where this is true the workflow should gather the following information from the row:
(These are all columns in the list)
-Report Title
-Responsible staff
-Due Date
I store each of these in their own collection variables, output from the list lookup query I managed to build. Could I possibly do it with one variable and still easily parse the data?
Responsible staff is going to be a problem currently as the data isn’t email addresses that I can use directly but rather it comes out as account names (ie John.Doe) since everything is tied to Active Directory. I can probably just change how we input this as it would probably be a ton of trouble to parse emails from this…or not what do I know.
Hitting run now produces the data I want to see in a long list one column of data at a time (all report titles, then all responsible staff, then all due dates). I just need to figure out how to get it concatenated, formatted and stuck into individual emails.
From here I’ve been reading through your knowledgebase and forums and I have a good idea of what components I need to make this work, I’m just not quite sure how to put it all together.
2) I need to setup a for each loop to crawl through each of the variables (excluding responsible staff), but here is where I become unsure of the best approach due to my workflow ignorance.
It looks like with my separate variable approach above I would need a separate for loop per variable to crawl through the data following a global index value (since each collection variable should contain the same number of lines). Then store the results of every iteration of each loop into temporary string variables that I can then feed into the build string object combining them into lines for storage in another collection variable. Hopefully on the right track so far.
I want the strings to end up looking like “ReportTitle is due on DueDate” for the single email alerts.
3) Then I know I would need another loop (possibly two?) to iterate through the stored strings variable and email variable and combine both of those into the send notification object in Nintex somehow.
Am I on the right track? Any guidance would be greatly appreciated!
I will be checking in frequently to answer questions and provide further information.