在 Lotus Notes 中以双向方式对列进行排序
我有一个主字段,其中包含每个文档的 10 个其他字段的值,当我尝试使用列排序属性在视图列中对该字段值进行排序时,我没有得到所需的结果。
这是价值如何显示的示例 - 10.其他 10.其他 1c.NSR 10.其他 1c.NSR 2b. 晶圆厂第一 10.其他 10.其他
应该显示如下。
10.其他 10.其他 10.其他 10.其他 10.其他 1c.NSR 1c.NSR 2b.First in Fab
任何建议都将受到重视...... 鲁佩什
I have a Main field which consist the value of 10 other fields for each document , when I tried to sort this field value in the view column using the column sorting properties I didn't get the desired result.
Here is the example how value is displaying -
10.other
10.other
1c.NSR
10.others
1c.NSR
2b.First in Fab
10.other
10.other
it should display like.
10.other
10.other
10.other
10.other
10.other
1c.NSR
1c.NSR
2b.First in Fab
Any suggestion will be appreciable......
Rupesh
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
列中的排序会将值视为字符串,除非您明确将它们视为数字。这意味着看起来数字的字段值被排序为字符串。这不是按数字顺序出现的。解决此问题的一个简单方法是使用零 (0) 前缀格式化您的数字,例如 01、02、03 等...否则您的排序顺序将类似于 1、10、2、20、3、30 等。
首先,确保包含“10 个其他字段”值的“主”字段是多值字段。您可以在表单设计中检查这一点并查看字段属性并启用“多个值”复选框。这仅适用于您尚未创建的文档。如果您已有主字段不是多值的文档,则可以通过将此公式添加到要排序的列来“分解”值,从而在列中修复它。
@explode(主要;",");
然后打开此列的属性对话框,转到第二个选项卡,然后启用“将多个值显示为单独的条目”复选框。当然,根据需要启用升序/降序排序首选项。希望排序能够按照您期望的方式进行。
Sorting in columns treats values as strings, unless you explicitly treat them as numbers. That means field values that look numeric are sorted as strings. Which doesn't come out in numerical order. A simple way to address this is to format your numbers with zero (0) prefixes, like 01, 02, 03 etc... otherwise your sorted order will look something like 1, 10, 2, 20, 3, 30 and so on.
Firstly, ensure that the "main" field that contains the values of the "10 other fields" is a a multi-value field. You can check this on the form design and looking at the field properties and enable the "Multiple Values" check box. This only works for documents you have not yet created. If you already have documents with the main field that is not multi-valued, then you can fix it in the column by "exploding" the value by adding this formula to the column you are sorting on.
@explode(main;",");
and then open this column's properties dialog box, goto second tab, then enable "Show multiple values as separate entries" check box. Ofcourse, enable the ascending /descending sort preference as you require. Hopefully the sorting will work the way you expect.