今天计算列问题的任何解决方案是 SharePoint? [英] Any solution to the Today Calculated Column problem is SharePoint?

查看:21
本文介绍了今天计算列问题的任何解决方案是 SharePoint?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我希望能够在 SharePoint 列表的计算列中使用今天的日期,例如,确定任务是否过期.有一个有据可查的技巧,包括创建一个名为Today"的虚拟列,在公式中使用它,然后将其删除,从而欺骗"SharePoint 使用 Today 函数.

I would like to be able to use today's date in a calculated column in a SharePoint list to, for example, determine whether a task is overdue. There is a well-documented trick that involves creating a dummy column named "Today," using it in a formula, and then deleting it, thereby "tricking" SharePoint into using the Today function.

问题是这种方法不可靠——计算不是动态的;它仅在保存项目时进行,因此今天列"实际上成为修改日期.(这可能就是 SharePoint 不允许您直接使用今日"功能的原因.)

The problem is that this method does not work reliably -- the calculation is not dynamic; it is only made when the item is saved, and therefore the Today "column" effectively becomes the Modified Date. (This is probably why SharePoint won't let you use the Today function in a straight-forward way.)

有没有人找到有效的解决方案?我知道我可以使用 javascript 获取客户端的实际日期并显示颜色、标志等,但我正在寻找服务器端"解决方案.

Has anyone found a solution that works? I know I can use javascript to get the actual date on the client side and display colors, flags, whatever, but I am looking for a "server side" solution.

作为参考,Today 专栏技巧及其问题在这两篇文章和相关评论中得到了很好的描述:http://blogs.msdn.com/cjohnson/archive/2006/03/16/552314.aspxhttp://pathtosharepoint.wordpress.com/2008/08/14/calculated-columns-the-useless-today-trick/

For reference, the Today column trick and its problems are described fairly well at these two posts and associated comments: http://blogs.msdn.com/cjohnson/archive/2006/03/16/552314.aspx and http://pathtosharepoint.wordpress.com/2008/08/14/calculated-columns-the-useless-today-trick/

推荐答案

根本没有解决方案.由于列表的值存储在数据库中并按原样"返回给搜索爬虫等其他功能,因此无法创建动态字段.

There simply isn't a work around for this. As the values for the list are stored in the database and returned "as is" to other featurs such as the search crawler, a dynamic field cannot be created.

可以创建一个自定义字段,在其计算中使用今天的日期显示值.

It is possible to create a custom field that will display the value using todays date in its calculation.

这篇关于今天计算列问题的任何解决方案是 SharePoint?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆