英文:
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 = varSelWH
和item_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 <= CountDate.SelectedDate && wh_code = varSelWH && 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 <> "1" && inv_dt <= CountDate.SelectedDate && wh_code = varSelWH && 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 <> "1"
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.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论