cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
sabbesar
Regular Visitor

How to update field column when item list has changed and how to send a notification or mail?

Thank you for your support on following:

There is a ‘status’ column with 4 possibilities: approved, requested, rejected, modified.

When a new item is created, the ‘status’ column field is by default set to ‘requested’.

Question 1: If whatever item from the list is modified or changed, can the ‘status’ column field be automatically updated to ‘modified’? How can I do that?

Question 2: can a mail be send only when the ‘status’ column field is showing ‘requested’ and ‘modified’.

Question 3: can a mail be send when the ‘status’ column field is changed/modified from ‘requested’/’modified’ to ‘approved’/’rejected’? In this case, the person who has ‘modified’ a list item (so not the ‘status’ column field) should be informed.

1 ACCEPTED SOLUTION

Accepted Solutions
v-yiwenxie-msft
Microsoft
Microsoft

Hi @sabbesar 

 

Question 1: If whatever item from the list is modified or changed, can the ‘status’ column field be automatically updated to ‘modified’? How can I do that?

 

The following step is for your reference:

The ‘condition’ is used to check whether the it’s a new item or a previously existed item. If it’s new, then terminate the flow. If not, then go on to update the ‘status’ column as modified.

3.1-5.PNG

Question 2: can a mail be send only when the ‘status’ column field is showing ‘requested’ and ‘modified’.

Question 3: can a mail be send when the ‘status’ column field is changed/modified from ‘requested’/’modified’ to ‘approved’/’rejected’? In this case, the person who has ‘modified’ a list item (so not the ‘status’ column field) should be informed.

 

Can I take your second and third question as that you want the flow to check for a specific column change and then if the field value is changed as specific value, send an email?

 

There are two methods to check for a specific column change:

Method 1—

You can reference the link below:

Check for a Change in a SharePoint List Column Val... - Power Platform Community (microsoft.com)

Although this method is more punctual when a specific column value has been changed, it’s quite troublesome.

 

Method 2—

This method is triggered every two minutes and thus less punctual but it’s more simple than the first method.

 

The whole flow is as below:

The time zone I’ve chosen is just an example, you can fill in your time zone.

3.1-6.PNG

 

The detailed step for ‘Get changes for an item or a file’:

3.1-7.PNG

The expression used:

subtractFromTime(utcNow(),20,'Minute')

 

For more info about the function subtractFromTime(), utcNow():

Reference guide for functions in expressions - Azure Logic Apps | Microsoft Docs

Reference guide for functions in expressions - Azure Logic Apps | Microsoft Docs

 

The detailed steps for ‘Condition’:

The ‘Condition 2’ is for your second question.

3.1-8.PNG

 

The detailed steps for ‘Condition 3’:

The ‘Condition 3’ is for your third question.

3.1-9.PNG

 

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.

View solution in original post

11 REPLIES 11
JPMHuls
Helper II
Helper II

Hi,

Assuming you intend to use Power Automate here are my answers to your question:

1) Yes, you can trigger a flow if an item has modified and you can update the Status from the flow as well. If "Update item/Update file properties" is showing too many fields, either use a view with only the required fields or set the List name of the Update action to a Compose value or workflow variable. This will then only show the ID and an Item field. In the latter you can put a key-value pair in JSON notation (key is the internal name of the field/column you want to update); e.g. {"Status": "Modified"}

2) Yes, you can either use the Outlook Send Email or the Mail Send notification actions.

3) Yes, there's an action to check the field values from a previous version; the list or library should have Versioning enabled/configured for this to work. If you don't want to use versioning, you need to create an extra column to store the previous Status value.

 

Testing if the flow needs to run can be configured in the trigger action's setting Trigger Conditions or with a Condtion action at the start of the flow.

sabbesar
Regular Visitor

Hi

Thanks for your response. I am new into this topic, so quite some learning ahead!

1) How can I make this update: a change in a list item should be a trigger to update the field in another column. Which Power Automate template/transaction do I need to use therefore? 

 

Thanks

 

v-yiwenxie-msft
Microsoft
Microsoft

Hi @sabbesar 

 

Question 1: If whatever item from the list is modified or changed, can the ‘status’ column field be automatically updated to ‘modified’? How can I do that?

 

The following step is for your reference:

The ‘condition’ is used to check whether the it’s a new item or a previously existed item. If it’s new, then terminate the flow. If not, then go on to update the ‘status’ column as modified.

3.1-5.PNG

Question 2: can a mail be send only when the ‘status’ column field is showing ‘requested’ and ‘modified’.

Question 3: can a mail be send when the ‘status’ column field is changed/modified from ‘requested’/’modified’ to ‘approved’/’rejected’? In this case, the person who has ‘modified’ a list item (so not the ‘status’ column field) should be informed.

 

Can I take your second and third question as that you want the flow to check for a specific column change and then if the field value is changed as specific value, send an email?

 

There are two methods to check for a specific column change:

Method 1—

You can reference the link below:

Check for a Change in a SharePoint List Column Val... - Power Platform Community (microsoft.com)

Although this method is more punctual when a specific column value has been changed, it’s quite troublesome.

 

Method 2—

This method is triggered every two minutes and thus less punctual but it’s more simple than the first method.

 

The whole flow is as below:

The time zone I’ve chosen is just an example, you can fill in your time zone.

3.1-6.PNG

 

The detailed step for ‘Get changes for an item or a file’:

3.1-7.PNG

The expression used:

subtractFromTime(utcNow(),20,'Minute')

 

For more info about the function subtractFromTime(), utcNow():

Reference guide for functions in expressions - Azure Logic Apps | Microsoft Docs

Reference guide for functions in expressions - Azure Logic Apps | Microsoft Docs

 

The detailed steps for ‘Condition’:

The ‘Condition 2’ is for your second question.

3.1-8.PNG

 

The detailed steps for ‘Condition 3’:

The ‘Condition 3’ is for your third question.

3.1-9.PNG

 

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.

View solution in original post

Hi

 

Solutions for my question 1 & 2 is solved. 

However, for the 3 question, I do not know which trigger to use to check the field values from a previous version. I need to know the modifier-1 as I will be the last modifier. In fact I need to send an email to the person who did the pre-last modification and not the last modification.

 

Regards

Sara

Thanks for this info!

However I am still encountering following issue: The person who last modified the item should NOT receive the mail, it should be the person that made the LAST-1 modification. How can I do this?

 

Regards

sara

JPMHuls
Helper II
Helper II

Hi Sara,

There's an SharePoint action "Get changes for an item or a file (properties)" which should help you resolve the 3rd question. Pre-requisite is that versioning is enabled. Another option is that you can to keep track of the previous editor using an additional column, filled from either a flow or InfoPath/Power App rule.

Kind regards,

Jean-Pierre

sabbesar
Regular Visitor

Jean-Pierre

The trigger is clear to, but how can I send an email to the one who had made the last-1 changes? Which dynamic content do I have to chose?

Regards

Sara 

JPMHuls
Helper II
Helper II

Hi Sara,

The Get changes returns information from a previous version, including the Modified By which you then can use in your Send email action. It's determining the previous version in Get Change action the you need to look into in order to configure it correctly.

So, if current version is 2.0, you use Get changes for version (Current -1.0 = 1.0) and then use the Modified By from the Get changes action in the To field of the send email action.

Kind regards,

Jean-Pierre

Hi Jean Pierre, this is how I have configured my flow:

sabbesar_1-1615547141244.png

 

Where can I put the link with the version?

 

Sara

JPMHuls
Helper II
Helper II

Hi Sara,

My mistake. This action only shows whether or not a column has changed. See the following post on how to retrieve a column value for a previous version: https://www.catapultsystems.com/blogs/get-previous-versions-of-sharepoint-list-items-in-flow/

sabbesar
Regular Visitor

Hi,

Thanks for this info, is getting more clear to me. However, I still do not know what to fill in in the 'to send a mail' as 'modified' is referring to the one who last modified and not the modified-1.

 

SAra

Helpful resources

Announcements
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

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

Top Solution Authors
Users online (41,494)