@DocDescendants 和 @DocChildren 是特殊文本

发布于 2024-10-22 12:14:26 字数 306 浏览 6 评论 0原文

我在使用此操作时遇到错误(数据类型不正确)。我想得到下面公式的平均值。获取@DocDescendants 和@DocChildren 平均值的正确公式是什么?或者是否有其他方法来计算类别和子类别,然后获取每个类别的平均值?

avg:=@DocDescendants/@DocChildren;

或者这也是

avg:=@Text(@DocDescendants/@DocChildren);

或者这也是

avg:=@ToNumber(@DocDescendants)/ @ToNumber(@DocChildren);

I got an error when I used this operation (Incorrect data type). I want to get the average of the below formula. What is the correct formula to get the average of @DocDescendants and @DocChildren? OR is there any alternative way to count the category and sub category then get the avg for each category?

avg:=@DocDescendants/@DocChildren;

OR this also

avg:=@Text(@DocDescendants/@DocChildren);

OR this also

avg:=@ToNumber(@DocDescendants)/ @ToNumber(@DocChildren);

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

你的背包 2024-10-29 12:14:26

@DocDescendants("%") 将返回后代文档的实际数量,@DocChildren("%") 将返回子记录的数量,如果省略“%”,则返回值不可用“特殊文本”,还有其他可选参数在 domino 设计器帮助中有详细记录。

注意:“%”返回一个字符串,因此要计算平均值,您需要将值包装在@textToNumber中,您可能还需要将计算包装在@Error中以处理没有响应的文档,这意味着您尝试除以零。这可能看起来很复杂,也是抱怨 Lotus 的另一个原因,但公式语言一旦你了解了它的速度就快得令人眼花缭乱,而且非常强大。

@DocDescendants("%") will return with actual number of decendant documents and @DocChildren("%") will return number of child records, if you omit the "%" then return value is unusable 'special text', there are other optional parameters which are well documented in domino designer help.

note: "%" returns a string so to compute average you'll need to wrap the value in @textToNumber, You might also need to wrap the calculation in @Error to handle docs with no responses which will mean your attempting a division by zero. This might all seem complicated, and another reason to grumble at Lotus but Formula language once you get your head around it is blindingly fast and very powerful.

冷…雨湿花 2024-10-29 12:14:26

还没有尝试过,但只是在帮助中查找它,它说“你无法将特殊文本转换为数字。”我想这就是它的特别之处:)一定是关于内部的东西视图索引的工作原理...
无论如何,了解视图中其他公式的局限性,我唯一能想到的就是运行一个代理来遍历视图中的条目,对于文档条目,使用 NotesViewEntry.DescendantCount 和 < code>NotesViewEntry.ChildCount 计算值并将其保存在文档中。它可能是预定的代理(使用有权编辑文档的 ID 叹息)。

这有帮助吗?

Haven't tried that, but just looked it up in the help and it says "You cannot convert special text to a number." I guess that's what's special about it :) Must be something about the inner workings of the view indexing...
Anyway, knowing about the limitations of other formulas in the views, the only think I can think of is running an agent that goes through the entries in the view and for document entries uses the NotesViewEntry.DescendantCount and NotesViewEntry.ChildCount to calculate the value and save it in the document. It could be a scheduled agent (sighed with an ID that has access to edit the documents).

Does that help?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文