SharePoint可以解决“今日计算列"问题吗? [英] Any solution to the Today Calculated Column problem is SharePoint?

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

问题描述

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

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.

作为参考,在这两篇文章和相关评论中对今日"专栏技巧及其问题进行了很好的描述: http://blogs.msdn.com/cjohnson/archive/2006 /03/16/552314.aspx

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天全站免登陆