如何使用lotus Notes在View中获取按类别创建的最新文档
如何使用lotus Notes @formula获取View中按类别创建的最新文档?
How to get the latest document created by category in View using lotus notes @formula?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
由于您使用的是 @formula 语言,我假设您需要从文档而不是 NotesDocument 对象(您需要为其编写 LotusScript)获取数据。
如果是这种情况,我建议使用
@DbLookup
函数和隐藏视图(视图名称括在括号中),其中第一个排序列 - 您将使用的类别和第二个排序列 - 函数 < code>@Created,按降序排序,因此第一个匹配的文档是最新的文档。您可以使用@DbLookup从文档中检索任何非富文本字段,或从第三列(第四列等)中检索预先计算的值(也可以包括纯文本,提取的文本)来自富文本字段)。
为了确保您访问最近创建的符合您条件的文档,视图需要自动刷新,并且您需要在
@DbLookup
中指定"NoCache"
。它可能看起来像:这可以帮助您实现您想要做的事情吗?
Since you are using @formula language, I assume you need to get data from the document and not the NotesDocument object (for which you would need to write LotusScript).
If this is the case, I would suggest using
@DbLookup
function with a hidden view (view name surrounded in parentheses) with first sorted column - the category you'll use and second sorted column - the function@Created
, sorted descending, so the first matching document is the most-recent one.You can use the
@DbLookup
to retrieve any non rich-text field from the document, or a pre-calculated value from the third (fourth, etc.) column (which could also include plain text, extracted from a rich-text field).To be sure you access the most-recently created document that matches your criteria, the view would need to refresh automatically and you will need to specify
"NoCache"
in the@DbLookup
. It could look something like:Does this help you achieve what you're trying to do?
嗯,用纯粹的@Formula 我认为你做不到。
我突然想到编写一个使用 @Command([ToolsRunMacro]) 调用的 LotusScript 代理,该代理使用 ViewNavigator 执行此操作并直接返回结果或在拾取结果的环境 (notes.ini) 中返回结果通过@公式。
Hmmm, with pure @Formula I don't think you can.
Off the top of my head, I'd look into writing a LotusScript agent called with @Command([ToolsRunMacro]) that does it with a ViewNavigator and returns a result directly or in the environment (notes.ini) where it is picked up by the @formula.