cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
PeterJennings
New Member

Send email when field hasn't been updated in x days

I'm trying to get a flow to email when a field has been set to a certain value for over x days.

 

I have a list with a field called "Location" with one of the choices being "Booked Out", the email needs to trigger when the field has been set to "Booked Out" for over 5 days .

 

I thought the solution to Solved: Email to be sent when SharePoint list item hasn't ... - Power Platform Community (microsoft.... could be the key but I've not been able to translate that into my scenario.

 

Assistance would be much appreciated!

1 REPLY 1
v-yiwenxie-msft
Microsoft
Microsoft

Hi @PeterJennings 

 

It seems like you want to check for a specific column change for sharepoint list.

 

If yes, then the whole flow is for your reference:

In my case, I check changes for a column named ‘Description’. The steps to complete this are a little complicated and I’ll explain to you in details.

If the change for the column value is equal to ‘Booked Out’. Then delay 5 days and check the item again, if it’s still ‘Booked Out’, then send an email.

2.25-8.PNG

 

For the ‘Condition’:

It’s used to check whether the item is created or changed. If the item is created, then exists flow. If the item is changed, then go on with the flow.

2.25-9.PNG

 

For the ‘Initialize variable to hold item ID’:

2.25-10.PNG

 

For the ‘Send an HTTP request to SharePoint’:

2.25-11.PNG

_api/web/lists/getbytitle('test1')/Items(@{variables('varID')})/versions

 

For the ‘Parse JSON’:

2.25-12.PNG

The ‘Schema’ is copied from the outputs of ‘Send an HTTP request to SharePoint’, which means before adding the ‘Parse JSON’ action, you need to run the flow and get the outputs of ‘Send an HTTP request to SharePoint’.

 

For the ‘Initialize variable to hold value to be compared’:

2.25-13.PNG

The expression used:
body('Parse_JSON')?['d']?['results'][1]['Description']

 

This expression is used to get the column value whose version is immediately before the current version.

Here, my column field name is ‘Description2’ though the column display name is ‘Description’. You can find the column field name in URL of the column as below:

2.25-16.PNG

 

For the ‘Condition 2’:

2.25-14.PNG

The condition 2 is used to check whether the previous version of the column value is equal to the current version of the column value.

If no, then it means that the item whose value has been changed is that of the ‘Description’ column.

Then go on with condition3. If the current value of the ‘Description’ column is equal to ‘Booked Out’, go on with ‘If yes’.

 

For ‘If yes’ in ‘Condition3’:

2.25-15.PNG

Delay 5 days and get the item again.

If the column value is still ‘Booked Out’, then send an email.

 

If you still have any problem with the steps regarding to how to check specific column change in sharepoint list: Check for a Change in a SharePoint List Column Val... - Power Platform Community (microsoft.com)

 

If you still have the problem, please feel free to let me know.

 

Best Regards,
Community Support Team _ Kira Xie
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Process Advisor

Introducing Process Advisor

Check out the new Process Advisor community forum board!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Top Solution Authors
Users online (12,887)