1

我们创建了一个逻辑应用程序,在其中我们使用公共数据服务(即列表记录)从 CRM 获取记录。

在此处输入图像描述

这将使用 For each 循环中的过滤器数组记录进一步的过滤器。for-each 循环在 SQL Server 存储过程的结果上运行,结果返回 9000 多条记录。List Record 操作返回来自 CRM 的所有记录,在 foreach 循环中,我们通过添加条件过滤记录并返回结果。

在此处输入图像描述

对于为每个记录成功执行但在运行详细信息中执行的每个循环,它显示过滤条件错误和逻辑应用程序失败并给出以下错误消息

{"code":"ActionResultsSizeLimitExceeded","message":"The action 'Filter_GSL_Status_by_Code' was executed for '9069' iterations resulting in an aggregated result size that exceeded the maximum value '209715200' bytes allowed. Please reduce the number of iterations to ensure that the aggregated results size is less than '209715200' bytes."}
4

1 回答 1

0

根据您的错误信息,过滤器无法突破自身的限制,因此您无法使用过滤器来解决您的问题。

也许您可以在逻辑应用程序中使用内联代码来过滤数组。在 内Inline Code,您需要使用 javascript。

例如

大批:

[
  {
    "testKey1": "testValue1",
    "testKey2": "testValue2",
    "testKey3": 1
  },
  {
    "testKey1": "testValue11",
    "testKey2": "testValue22",
    "testKey3": 2
  },
  {
    "testKey1": "testValue3",
    "testKey2": "testValue3",
    "testKey3": 3
  },
  {
    "testKey1": "testValue4",
    "testKey2": "testValue4",
    "testKey3": 4
  }
]

Azure 逻辑应用工作流:

在此处输入图像描述

js代码:

var arr = <your-array>;
var resultArr = [];

for(var i=0; i<arr.length; i++){
    var item = arr[i];
    var key3 = item.testKey3;
    if(key3 > 2){
        resultArr.push(item);
    }
}

return resultArr;

顺便说一句,您需要将集成帐户添加到您的逻辑应用。

于 2020-11-23T09:09:29.283 回答