在 Azure 逻辑应用条件中访问 Azure SQL 存储过程
Accessing Azure SQL Stored Procedures in Azure Logic App Conditions
我想在 Azure 逻辑应用程序中针对条件块使用 Azure SQL 存储过程的输出。到目前为止似乎没有这方面的文档,或者我使用了错误的关键字进行搜索?
我有一个 Azure SQL 存储过程,我执行它 returns 以下输出:
{
"statusCode": 200,
"headers": {
"Pragma": "no-cache",
"x-ms-request-id": "xxx",
"Cache-Control": "no-cache",
"Date": "Fri, 15 Jul 2016 08:40:23 GMT",
"Server": "Microsoft-IIS/8.0,Microsoft-HTTPAPI/2.0",
"X-AspNet-Version": "4.0.30319",
"X-Powered-By": "ASP.NET",
"Content-Length": "78",
"Content-Type": "application/json; charset=utf-8",
"Expires": "-1"
},
"body": {
"OutputParameters": {},
"ReturnCode": 0,
"ResultSets": {
"Table1": [
{
"Column1": 0
}
]
}
}
}
我对 Column1 的值(在本例中为 0)感兴趣。如何在条件中引用此值?
我见过一些人使用 Xpath(它似乎是 Azure Logic 应用程序的早期迭代)或一些 JSON 风格的结果集中引用节点,但似乎对我没有任何作用。
由于结果集是一个数组,你想用一个 'foreach' 表达式来装饰你的动作,以便枚举所有项目,即
"foreach": "@body('storedProcedureActionName').ResultSets.Table1"
您现在可以使用 @item().Column1
在操作输入中引用 Column1 字段的值
我想在 Azure 逻辑应用程序中针对条件块使用 Azure SQL 存储过程的输出。到目前为止似乎没有这方面的文档,或者我使用了错误的关键字进行搜索?
我有一个 Azure SQL 存储过程,我执行它 returns 以下输出:
{
"statusCode": 200,
"headers": {
"Pragma": "no-cache",
"x-ms-request-id": "xxx",
"Cache-Control": "no-cache",
"Date": "Fri, 15 Jul 2016 08:40:23 GMT",
"Server": "Microsoft-IIS/8.0,Microsoft-HTTPAPI/2.0",
"X-AspNet-Version": "4.0.30319",
"X-Powered-By": "ASP.NET",
"Content-Length": "78",
"Content-Type": "application/json; charset=utf-8",
"Expires": "-1"
},
"body": {
"OutputParameters": {},
"ReturnCode": 0,
"ResultSets": {
"Table1": [
{
"Column1": 0
}
]
}
}
}
我对 Column1 的值(在本例中为 0)感兴趣。如何在条件中引用此值?
我见过一些人使用 Xpath(它似乎是 Azure Logic 应用程序的早期迭代)或一些 JSON 风格的结果集中引用节点,但似乎对我没有任何作用。
由于结果集是一个数组,你想用一个 'foreach' 表达式来装饰你的动作,以便枚举所有项目,即
"foreach": "@body('storedProcedureActionName').ResultSets.Table1"
您现在可以使用 @item().Column1