在 Power Apps 中,对筛选表格的相似条件具有不同的委托含义。

huangapple go评论54阅读模式
英文:

Similar conditions on a filtered table have different implications for delegations on Power Apps

问题

新手使用Power Apps,委托让我感到困扰。

在画布应用中,我有以下代码,它运行正常:

ClearCollect(
    colFilteredByWHandProd,
    Filter(
        tracker_data,
        inv_dt <= CountDate.SelectedDate && wh_code = varSelWH && item_no = varSelProd
        )
);

然而,如果我尝试添加第四个筛选条件,对列表上的一列进行评估,该列要么是"0",要么是"1",我会收到可能的委托错误警告:

ClearCollect(
    colFilteredByWHandProd,
    Filter(
        tracker_data,
        proj_val <> "1" && inv_dt <= CountDate.SelectedDate && wh_code = varSelWH && item_no = varSelProd
        )
);

这没有任何意义。wh_code = varSelWHitem_no = varSelProd两部分都不会引发错误警告。此外,SP列表上的item_no、wh_code和proj_val字段都是单行文本字段。

我尝试过更改顺序,甚至减少筛选条件的数量。但一贯地,我只在proj_val <> "1"上收到错误警告。

一个可能的问题是,SP列表上的proj_val字段是一个计算列。

英文:

New to Power Apps and delegations are driving me crazy.

On a canvas app, I have the following code which works fine:

ClearCollect(
    colFilteredByWHandProd,
    Filter(
        tracker_data,
        inv_dt &lt;= CountDate.SelectedDate &amp;&amp; wh_code = varSelWH &amp;&amp; item_no = varSelProd
        )
);

However, if I try to add a fourth filter, which evaluates on a column on the list that is either "0" or "1", I get possible delegation error warnings:

ClearCollect(
    colFilteredByWHandProd,
    Filter(
        tracker_data,
        proj_val &lt;&gt; &quot;1&quot; &amp;&amp; inv_dt &lt;= CountDate.SelectedDate &amp;&amp; wh_code = varSelWH &amp;&amp; item_no = varSelProd
        )
);

This doesn't make any sense. Both the wh_code = varSelWH and the item_no = varSelProd portions donot throw any error warnings. Furthermore, the item_no, wh_code and proj_val fields on the SP list are single line text fields.

I have tried changing the order and even reducing the number of filters. But consistently, I only get the error warning on proj_val &lt;&gt; &quot;1&quot;

One possible culprit is that the proj_val field on the SP list is a calculated column.

答案1

得分: 0

替代链接过滤条件,您应该嵌套多个Filter()函数以克服委派问题。

'not' 操作不能委派给 SharePoint,因此请实施一种逻辑,使其不是最内层的过滤条件。

英文:

Instead of chaining filter conditions, you should nest multiple Filter() functions to overcome delegation.

A 'not' operation is not delegable to SharePoint, so implement a logic where it is not the innermost filter.

huangapple
  • 本文由 发表于 2023年5月29日 07:37:05
  • 转载请务必保留本文链接:https://go.coder-hub.com/76353991.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定