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

How to update cilumn field when list item has been changed or modified and how to send out mail notifications

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-duann-msft
Community Support
Community Support

Hi @sabbesar 

 

Thank you for posting.

 

According to your description, you have 3 requests. Here is the related information for your reference:

 

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?

We can configure flow as below:

v-duann-msft_0-1614397444886.png

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

Yes, it can be configured as below:

v-duann-msft_1-1614397444894.png

 

3.can a mail be send when the ‘status’ column field is changed/modified from ‘requested’/’modified’ to ‘approved’/’rejected’?

I’m afraid it’s tough to achieve all. We can combine ‘do until’ action with condition to detect new created records. However, it won’t work for former rows.

 

The whole flow may process as below:

When an record with ‘requested’/’modified’ status added to the list, the flow starts and navigates to condition yes branch.

The flow will still running until when the status of this item changed to ‘approved’/’rejected’. Then email sent.

v-duann-msft_2-1614397444899.png

 

Related expression:

@or(equals(triggerOutputs()?['body/Status/Value'], 'approved'),equals(triggerOutputs()?['body/Status/Value'], 'rejected'))

 

For records created before we create this flow, it won’t work as tested.

 

Hope the content above may help you.

 

Thanks

Anna

View solution in original post

2 REPLIES 2
v-duann-msft
Community Support
Community Support

Hi @sabbesar 

 

Thank you for posting.

 

According to your description, you have 3 requests. Here is the related information for your reference:

 

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?

We can configure flow as below:

v-duann-msft_0-1614397444886.png

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

Yes, it can be configured as below:

v-duann-msft_1-1614397444894.png

 

3.can a mail be send when the ‘status’ column field is changed/modified from ‘requested’/’modified’ to ‘approved’/’rejected’?

I’m afraid it’s tough to achieve all. We can combine ‘do until’ action with condition to detect new created records. However, it won’t work for former rows.

 

The whole flow may process as below:

When an record with ‘requested’/’modified’ status added to the list, the flow starts and navigates to condition yes branch.

The flow will still running until when the status of this item changed to ‘approved’/’rejected’. Then email sent.

v-duann-msft_2-1614397444899.png

 

Related expression:

@or(equals(triggerOutputs()?['body/Status/Value'], 'approved'),equals(triggerOutputs()?['body/Status/Value'], 'rejected'))

 

For records created before we create this flow, it won’t work as tested.

 

Hope the content above may help you.

 

Thanks

Anna

View solution in original post

Hi Anna

Thanks for your answer.

Another question I have: If I afterwards adjust manually the status from modified to approved, the flow needs to stop. How can I do this? Is there a possibility that the flow only works on all items that are modified, except for the Status column?

 

 Regards

Sara

Helpful resources

Announcements
MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

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

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

Top Solution Authors
Users online (60,742)