SharePoint 列表计算

发布于 2024-07-27 14:53:56 字数 190 浏览 2 评论 0原文

我想知道是否有一种方法可以在共享点中有一列,该列是当前列和前一列的总和,

就像这样

Title      Value     Total 

entry1       10        10
entry2       20        30 
entry3       20        50

I was wondering is there a way to have a column in share point that is a sum but only of the current column and the previous column

Like this

Title      Value     Total 

entry1       10        10
entry2       20        30 
entry3       20        50

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

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

发布评论

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

评论(2

不知在何时 2024-08-03 14:53:56

我认为它不可能开箱即用,但根据您的要求,可能可以创建您自己的字段类型来实现这一点。 以下是有关 SharePoint 中自定义字段类型的一些信息:http://msdn.microsoft。 com/en-us/library/ms446361.aspx

如果更改列表中的视图,该值是否会自动更改? 如果是这样,您就陷入困境了,因为列表视图中的值是使用 CAML 渲染模式计算的。 我想使用 JavaScript 可以做到这一点,但我不推荐它。

如果您始终具有相同的视图,则可以重复使用视图中的 CAML 查询来获取当前正在编辑的列表项之前的列表项。 然后,您必须设置当前列表项中的字段值并更新所有其他受影响的项目。

I dont think its possible out of the box, but depending on your requirements it might be possible to create your own field type which does it. Here's some info on custom field types in SharePoint: http://msdn.microsoft.com/en-us/library/ms446361.aspx

Should this value automatically change if you change the view in the list? If so, you're in deep water since the value in a lists view is calculated using a CAML render pattern. I guess it would be possible to do it using JavaScript, but I wouldn’t recommend it.

If you always have the same view you can reuse the CAML query from the view to get the list item just before the one you are currently editing. Then you'll have to set the value of the field in the current list item as well as updating all other affected items.

神魇的王 2024-08-03 14:53:56

如果您对这样的显示有要求,您可能会发现根本不将其存储为列,而是使用输出表视图的 SharePoint Designer(或您选择的 Web 部件创建机制)执行数据表单 Web 部件更容易这看起来像你想要的。 我认为使用带有一两个变量的 XSLT 模板进行这种运行总计应该相对容易。

我认为没有一种有效的方法可以用实际的列来做到这一点。

If you have requirements for a display like this, you may find it easier to not store it as a column at all but just do a data form web part using SharePoint Designer (or your web part creation mechanism of choice) that outputs a table view that looks like what you want. I think it should be relatively easy to do that kind of running total with an XSLT template with a variable or two.

I don't think there is going to be an efficient way to do this with an actual column.

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