[英]Loop all the rows in SQL server table in Azure logic apps
I am developing an Azure logic app.我正在开发 Azure 逻辑应用程序。
Issue: I have a table with multiple rows.问题:我有一个包含多行的表。 I have to retrieve all the rows and send an email for every row separately.我必须检索所有行并分别为每一行发送一封电子邮件。
I am able retrieve all the rows using action "Get Rows", but how do I loop this rows to send an email for each row?我可以使用“获取行” 操作检索所有行,但是如何循环此行以为每一行发送电子邮件?
Any help is appreciated.任何帮助表示赞赏。
Instead of using GetRows, you can use Execute Query or Execute Stored Procedure to get the Result set and then use Action control to iterate over the result set and send an email then.您可以不使用 GetRows,而是使用 Execute Query 或 Execute Stored Procedure 来获取结果集,然后使用 Action 控件遍历结果集并发送电子邮件。
The answer provided by Sajeetharan is a good solution, but since you have get the data from sql database by "Get Rows" action. Sajeetharan 提供的答案是一个很好的解决方案,但由于您已通过“获取行”操作从 sql 数据库中获取数据。 I think you just need to use "For each" action to loop the "value" from "Get Rows".我认为您只需要使用“For each”操作来循环“Get Rows”中的“value”。
My table for test in database is shown as below:我在数据库中的测试表如下所示:
I received the three emails successfully.我成功收到了三封邮件。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.