cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
sebastianslz
Frequent Visitor

How to send notification only when an item is modified - SQL Server

I am making use of the "When an item is modified (V2)" action of SQL Server, this to determine if an item was modified in the table and then send a notification.
 
There are two situations where I want mail to be sent when you modify a table item in SQL Server.
 
One of the situations in which the flow is executed is when the value of the "Estado" column that is of type boolean changes to "false", after the flow is executed the notification is sent.
 
Another situation in which the flow is executed is when the modification is made to any field in the table, that is, any modification that is made to a record, whether it is a change in a text entry, name change, etc., after this a notification will also be sent.
 
I am presenting a problem and it is when the second situation is executed, in which I make a modification to any field and where the record has as "Estado" equal to "false", it is here where the two conditions are being executed and the notification is being sent for the first situation that I mention and for the second.
 
I want to correct in my flow is that when I make the modification to any field in a record where the "Estado" column is equal to "false" only the notification of this situation is sent.
 
The following is the flow I am using where I have a parallel branch with the two conditions mentioned:
 
sebastianslz_0-1653684568189.png
Someone has an idea of what change I should make in my flow so that the notification was only sent in case of making a modification to any field regardless of whether it has as "Estado" equal to "false", I am having a problem because when I make a modification I am being sent the notification in both situations.
2 REPLIES 2
v-xiaochen-msft
Community Support
Community Support

Hi @sebastianslz ,

 

At my knowledge, powerautomate cannot capture which column value has changed.

I think you need to backup the table's item before updating it or enable 'change data capture' for the table so that you could  identify two situations in the flow by capturing which column values have changed.

So I think this looks like a Sql server question. I am not familiar with sql. Maybe you can find the answer in the sql forum/blog.

 

Best Regards,

Wearsky

 

Possibly useful, I do not know the functionality of Filter Query, Order By, with which I think I can rule out that the "Estado" is equal to "false", regardless of the modification I have made in other fields and that it does not run in the first situation I mentioned above, I hope to be clear enough in this case.

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Users online (3,175)