问题描述
该视图是一个员工列表,第一个排序的列是部门".有8个部门:A,B,C,D,E,F,G,H.在某些情况下,我只需要显示来自部门 C & 的员工.仅 G(或可能来自 3、4 或更多部门在不同条件下).类似于视图选择公式(@Formula),其中:
The view is a list of staffs and first sorted column is 'Department'. There are 8 department: A,B,C,D,E,F,G,H. Under certain conditions, I need to display only staff from department C & G only(or maybe from 3, 4 or more department under different conditions). Something like in view selection formula(@Formula) where:
SELECT (Form="Staff") && (Department="C" || Department="G")
在按类别名称过滤"中,我输入了静态值:部门.
In the 'Filter by Category Name', I put static value:Department.
在按列值过滤"中,我测试静态值:C、G 和 C;G.两者都不会显示任何结果.我用以下代码测试计算值仍然不能:
In the 'Filter by column value', I test static values: C,G and C;G. Both won't display any result. I test compute value with following code still can't:
var newArr=new Array("C");
newArr.push("G");
return newArr;
对于真实视图,部门列,我打开/关闭分类但没有成功.
For the real view, Department column, I turn on/off Categorized but no success.
对我的要求有什么解决方法吗?或者按列值过滤"根本不能接受多个值?目前我正在尝试对视图选择公式中的所有内容进行编码(我不确定是否可能,因为我想创建如下内容:
Any workaround for my requirement? Or the 'Filter by column value' simply can't accept multiple value? Currently I'm trying to code everything in the view selection formula(which I'm not sure if possible since I want to create something like:
SELECT (Form="Staff") && ----the part here will be dynamically generated multiple (Department=" " || Department=" " and so on)
我的设计师和笔记是 8.5.3(有 extlib 但没有任何修复包.如果这有帮助的话)
My designer and notes are 8.5.3(with extlib but without any fixpacks. if this will help)
推荐答案
按列值过滤取 ONE 值.您可以做的是在 view.FTSearch 中指定搜索查询中的部门,或者您作弊"并首先加载一个部门,然后使用 Ajax 调用来修改加载的数据以检索第二个部门.
Filter by column value takes ONE value. What you could do is either a view.FTSearch where you specify the department in the search query or you "cheat" and load one department first and amend the loaded data with an Ajax call retrieving the second one.
这篇关于XPage 按列值过滤.如何显示 8 个可用值中的 2 个值?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!