SharePoint 计算列中的列取消引用 [英] columns dereferencing in SharePoint's calculated column

查看:38
本文介绍了SharePoint 计算列中的列取消引用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用简单的公式:

="FIX_" &[ID]

当我确认计算的函数时,出现此公式的问题,公式似乎恢复为:

="FIX_" &ID

现在的问题是这些不再引用 [ID] 列,因此结果返回

"FIX_"

所有记录.这对于输入的第一条记录确实有效,但任何其他后续条目都会显示此错误.

这是一个已知问题吗?

解决方案

所以你只想在 VIEW 中显示链接.

然后您可以在计算列中使用 HTML/JavaScvript 从 HTML TR 表行中提取正确的 ID并创建 href 属性.

创建一个计算列,将数据类型设置为数字!

粘贴公式(原样,包括 & 字符,换行符将被忽略):

="

注意:添加外部 div 是因为 Number 列向右对齐.

这只适用于视图!不在表单上!

I want to use the simple formula:

="FIX_" & [ID]

The issue with this formula occurs when I confirm the calculated function, the formula appears to revert back to:

="FIX_" & ID

The problem is now that these are no longer referencing the [ID] column so the result returns

"FIX_"

for all records. This does work for the first record entered but any other subsequent entries display this error.

Is this a known issue?

解决方案

So you only want to display the link in a VIEW.

You can then use HTML/JavaScvript in a Calculated Column to extract the correct ID from the HTML TR table row and create the href attribute.

Create a Calculated Columns, and set the datatype to Number!

Paste the Formula (as is, including & characters, line breaks will be ignored):

="<div ""style=text-align:left""><a><img src=""/_layouts/images/blank.gif"" onload=""{"
&"var row=this;while(row.tagName!='TR'){row=row.parentNode;}"
&"var ID=row.id.split(',')[1];"
&"this.parentNode.href='v://database//FIX_'+ID;"
&"}"">database folder</a></div>"

Note: the outer div is added because a Number column is aligned to the Right.

This only works in VIEWS! Not on FORMS!

这篇关于SharePoint 计算列中的列取消引用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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