在Lotus Notes公式中排序 [英] Order by in Lotus Notes formula
问题描述
是否可以从Lotus Domino数据库中查询具有比给定编号/ID更大的通用ID的那些文档,并使用Lotus公式查询按通用ID对其进行排序?如果是,怎么办?
Is is possible to query those documents from a Lotus Domino database which have bigger universal ID than a given number/ID and order them by their universal ID with a Lotus formula query? If yes, how?
在SQL中,以下内容与我想要的类似:
In SQL the following is similar to what I'd like to:
SELECT universalId
FROM all_documents
WHERE universalId > custom_value
ORDER BY universalId
推荐答案
是:
SELECT @Text(@DocumentUniqueId) > custom_value
这将在视图选择公式中起作用.如果您还为视图@Text(@DocumentUniqueId)
的第一列制定公式,并设置视图的sort属性,则等效于ORDER BY
.
This will work in a view selection formula. If you also make the formula for the first column of the view @Text(@DocumentUniqueId)
, and set the sort property for the view, then you have the equivalent of ORDER BY
.
选择公式也可以在LotusScript或COM中的NotesDatabase.Search()
调用中或在Java中的Database.Search()
调用中工作.这将为您提供一个NotesDocumentCollection
(或Java中的DocumentCollection
),并且您可以编写代码对其进行排序.
The selection formula will also work in a NotesDatabase.Search()
call in LotusScript or COM, or a Database.Search()
call in Java. That will give you a NotesDocumentCollection
(or DocumentCollection
in Java), and you can write code to sort it.
注意:在大型数据库中,search()
方法将效率很低.
NOTE: The search()
method will be will be quite inefficient in large databases.
这篇关于在Lotus Notes公式中排序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!