Help with Reminder WorkFlow


Badge +4

Hi everyone, I'm currently doing a reminder workflow on a list which will send an email to the people in charge how many days are left.

My conditions are

 

Send email for item when the column daysleft is 7,

daysleft is 3 to 1

daysleft is 0 or less.

My days left column is a calculated column, where I take the Due Date - Current Date.

I have a site workflow which updates the Current Date column to the current time daily. Thus the Days left column will update daily.

This is my list containing all my items.

This is my list workflow.

Right now I want to add the description and title into the email messages, but whenever I use the item properties, it just repeats the description and title for all the emails even if its not the same item.

For example I want the email to be like this

Subject: Title One

There will be the description of the item in the text box, including how many days left (I did this one already).


22 replies

Badge +3

Hi John,

To be clear, are you using 2 workflows here?

1) Site workflow to update the DaysLeft column

2) List workflow to send the notifications

Please elaborate

Badge +4

Yeah, the Site workflow is to update the current time column thus it will lead to the updated DaysLeft column. The list workflow is to send notifications yes.

Badge +3

Can you add a snapshot of the Email notification action. Also what is the condition to start the list workflow?

Badge +4

The condition to start the list workflow, is whenever an item is modified, all the items will be modified which is what I want. The site workflow will update the Current Date column, causing the daysleft to be updated.

This is my email, all three are the same.

oh btw I updated my workflow, this is what it looks like now, I'm not sure if I need to use a collection variable? I removed it. If I do need it please let me know thanks.

sorry for the messy crop, I have a small resolution

The problem now is that, whenever I query and place them in a collection variable, and then use For Each function to loop them. It will use all the the variables in the collection, I just want the workflow to use the value that its in the column.

Badge +3

Hi John,

I think one site workflow is enough for this type of reminders.

Do you have requirement to display the DaysLeft on any page/dashboard? 

Badge +4

I'm not too sure about that because I'm not in charge of it. So is there any way to ensure that for that item, the list workflow checks the DaysLeft column then send the email if it fuffils the conditions?

Badge +3

Yes,

In workflow settings, add a conditional start to the list workflow on item modified.

In the filters add 7 or or "less than 4" as parameters. This will ensure that your workflow is executed only when needed.

Implementation:

1) Get the DaysLeft in a workflow variable and convert it to number by using "Convert Value" action.

2) Based on the DaysLeft you can Run parallel actions for each value of the workflow variable for DaysLeft (7,3,2,1,0, less than 0)

3) Add the current item properties in the Email and workflow variable for DaysLeft.

let me know if this helps.

Badge +4

Alright I’m currently away from my laptop, I’ll update u Tmr? Oh and do I just to clarify, The email sent will have the corresponding item’s description and title right?  Oh and it will still be a list workflow right? 

EDIT: Wait don’t i have to use a collection variable? Because the list query will have multiple values? What about For each loop? 

Badge +3

If you are using a list workflow, the email sent will have current item's description and title.

For each loop is not required your case as you are executing the workflow for the specific item. the workflow will always have current item in context for using in the item properties.

Userlevel 5
Badge +14

so, you have a site workflow, that updates plenty of/all  items in the list.

once the item is updated by a site workflow, list workflow is triggered.

list workflows queries the (whole) list to look for item which reminder need to be send out for => ie. if you have 100 items in the list (that needs to be reminded), and site workflow update each of them, you start list workflow 100x (one for each item) and each single workflow will send 100 notifications (again for each item) in a loop, so you end up with 100*100 notifications...

I guess this is not what is expected happy.png

it as well explains your question

Right now I want to add the description and title into the email messages, but whenever I use the item properties, it just repeats the description and title for all the emails even if its not the same item.

since you run the loop (eg.) 100 times on a single item you still get the same 'Description' from that current item.

either remove query list and loop action and let the notification run just once for current item once the workflow is triggered by DaysLeft change made by site workflow.

or move this existing notification logic to a site workflow so that it runs just once for all the items in list.

Badge +4

Thanks, but I need to query list to filter out certain stuff like if somebody doesn’t put a date on the due date column the email will not send and issue status column which needs to be ‘in progress’ to send the email. Is there any other way to do this? 

Badge +3

Add both, Blank due date and In progress status in the Run If Action condition.

If Due date is not blank and Status is In Progress, add the email notification inside.

Badge +3

In case if the DaysLeft is not needed in any list views or reports/dashboard, moving the logic of sending notification to site workflow is the best option here. Usually such data is required in the reports to track the pending items in open status.

Userlevel 5
Badge +14
 I need to query list to filter out certain stuff

assuming list workflow, you do not need query list for that. you can check respective list fields on current item from ItemProperties...

 if somebody doesn’t put a date on the due date

if you require DueDate is provided, make it a required field on list or create a validation rule in form.

or you can default it to current date if not provided.

so you do not need to extar deal with empty dates in notification workflow.

issue status column which needs to be ‘in progress’

you can can configure workflow start condition so that it only triggers for items with current status = 'In progress'

Badge +4

But if I move it to a site workflow, will my workflow be the exact same as the one I posted (the first one)? I just need to copy and paste that? But then, how can I put the description and title for each of the items in the email notification? 

Badge +4

I don’t think I can make it a required field in the list because, I’m not in charge of that part. Is there another way I can make it so that it will not send any emails for those items without due dates? 

Badge +4

Yeah ur correct, now if there’s a 10 items for example, I just want to send the due date left for those 10 items including that individual items (title and description) IF specific conditions are met like it will only send if that item Issue Status column is ‘In Progress’ and will not send anything IF the Due Date column is empty/null.  

I want the list workflow to update each item individually and use their latest value in the DaysLeft and then make decisions whether to send or not. ( of course including whether it’s In Progress and if there is a Due Date).

Right now it’s just sending all the emails for each item, if the values in the collection variable meet the requirements, it’s fustrating sad.png.

I just want 1 email per item containing the days left value for that item and the title and description column values for that item.

Badge +4

hi is this the correct way of doing it?

here's my convert value config

my Run if 3 to 0 config

^^^But it says the following fields 'Value' Cannot be blank? Any way to bypass this?

EDIT: Oh nvm, I got it I used the set variable function to store the DueDate into VarLookUpVar

my workflow for the rest

Badge +3

Hi John,

To compare with a blank date follow below steps

1. Create a workflow DateTime variable - emptyDate
2. Add a Convert Value action before the Run parallel
3. Configure the action with input - 1/1/0001
4. The output variable is the blank DateTime variable.

5. Use the emptyDate variable in Run If

216607_pastedImage_1.png

216611_pastedImage_2.png

Badge +3

There will be some modifications required to the workflow. You will need some collection objects to be created to store the Title, Description and the Due Dates to compare for the email notification.

Badge +4

thanks, I did it slightly different tho, I tested it and it works fine.

Heres my Run if Config

Userlevel 5
Badge +14
 Is there another way I can make it so that it will not send any emails for those items without due dates? 

empty date in calculations is considered to be 1.1.1900. so if you subtract it from current date (or vice versa) you'll get big (positive or negative) number. so you can assume, if ABS(difference) is greater then (eg) 365 (1 year) you'll not sent notification.

But if I move it to a site workflow, will my workflow be the exact same as the one I posted (the first one)?

basically yes.

But then, how can I put the description and title for each of the items in the email notification? 

you'll have read it in within Query list action, along with other data from list.

Right now it’s just sending all the emails for each item, if the values in the collection variable meet the requirements, it’s fustrating

I'd say you'd need to take a little rest, clear the head and (re-)think of overall concept how you'd like to implement it.

currently you mix two different approaches (site vs. list workflow) and you're not very clear what part of the logic should be placed where.

I do not say mix of site and list workflow is a bad approach, you just have to sort things a bit what should be performed when and where.

the basic difference between the two is that site workflow runs on (as name denotes) a site level, so it doesn't have direct access to any list and items. so if you need to work on a specific list and its items you have to query for the data first, store them into (typically collection) variables and then process them somehow (typically within for each loop)

on the other hand, list workflow instance runs on one specific single list item. so within workflow you have access to current list item values (ItemProperties in workflow naming). so you do not neither need to perform any extra query to get data, nor looping to process them. as well, it's not very typical you'd process all items from the list with a list workflow instance running on one of the items, and definitely not in your case.

let the list workflow instance run and process data of just that current item it runs on.

I'd recommend to read through Cassy Freeman‌'s blog where she describes typical pattern how to implement notification workflow. with that approach you even need not to bother with regular DaysLeft recalculations....

Site Workflow - Document Review Date Approaching Reminders 

Reply