Azure logic app with Condition

最后都变了- 提交于 2019-12-11 18:36:48

问题


I am creating the logic app when I want to send an email when there are duplicate entries created in my database, and until those are not removed email should be triggered after some interval

As per Logic App, we can create a trigger on SQL when data is inserted or modified as bellow

So I selected the first option then I am adding another action which will run my SQL script to check the logic of duplicate entries

and last I have added another action to send an email.

Now I want my last action of sending email to be executed only when my query comes up with some result


回答1:


You can use a Condition Control to check whether the given result set is valid if the condition satisfies then you can send the email

See my logic app below.

Here I've added the Execute a Stored Procedure Action. My stored procedure returns resultsets, you can use the logic for checking the duplicate and in the next condition you can check the duplicate result is true (or) false. If it's true you can send email else not to.

Update 1

How to Add condition control




回答2:


I think you're better off programming the duplicate condition detection into a Stored Procedure rather than a SQL Trigger then using the Logic App change Trigger.

Instead, use a Logic App and Recurrence to call the Stored Procedure that queries for duplicates and returns the necessary meta data.

Trigger + table + change will be less reliable then you expect and much harder to maintain.



来源:https://stackoverflow.com/questions/51930837/azure-logic-app-with-condition

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!