domino用lotus script对遍历出来的数字排序

代理如下,在视图中增加排序的列不起作用,结果的数字依然没有顺序,想写一个排序方法对这些数字进行排序,排序后保存到strResult中,求解应该怎么写?Dim dc As NotesDocumentCollection Set dc=view.Getalldocumentsbykey(CStr(astrUser)+"*%*"+strDepCode, False) Set doc=dc.Getfirstdocument() While Not doc Is Nothing Set nmUser = New NotesName(doc.FullName(0)) strResult = strResult + doc.weight(0)+ ";" MsgBox strResult End If Set doc = dc.Getnextdocument(doc) Wend 图片是后台输出的结果 第一个永远是3300,完全不按视图的排序来
2026年09月26日 11:29
有1个网友回答
网友(1):

请使用Set vc = view.GetAllEntriesByKey。 因为Set dc=view.Getalldocumentsbykey 方式取出来的dc是按文档创建时间排列的。