xpages 在列表中添加@formula [英] xpages adding @formula in list
本文介绍了xpages 在列表中添加@formula的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
有一个客户端笔记应用程序,在其主要形式中,有一个具有以下公式的对话框列表:(C21331:312321C 实际上是副本 ID,在此示例中它只是一个随机数)
There is a client notes application and in its main form, there is a dialogList having this formula: ( C21331:312321C is, actually, the replica ID, in this example it's just a random number )
_view := "vw1";
_vieww :="vw1";
x :=@Sort(@Unique ( @DbColumn( "" : "NoCache" ; C21331:312321C; _view; 1 ) );[Ascending]);
y :=@Unique ( @DbColumn( "" : "NoCache" ; @DbName ; _vieww ; 1));
y:x
如何在我的组合框计算值中使用上面的代码?我试过了:
How to use thee above code in my combobox computed values? I tried:
var _view = "vw1";
var _vieww= "vw2";
db = new Array(@Sort(@Unique ( @DbColumn( "" : "NoCache" , C21331:312321C, _view, 1 ) );[Ascending]);
db1 = new Array(@Unique ( @DbColumn( "" : "NoCache" ; @DbName ; _vieww ; 1)));
db:db1
如何在 xpages 中实现此功能?感谢您抽出宝贵时间.
How can I achieve this functionalty in xpages? Thanks for your time.
推荐答案
使用 .sort()
对数组进行排序(@Sort 在 SSJS 中没有实现)和 .concat()
连接两个数组或一个数组和一个字符串:
Use .sort()
to sort an array (@Sort is not implemented in SSJS) and .concat()
to concatenate two arrays or an array and a string:
var a = [].concat(@Unique(@DbColumn( ... ))).sort();
var b = @Unique(@DbColumn( ... ));
return a.concat(b);
这篇关于xpages 在列表中添加@formula的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文