SharePoint Calculated Columns are powerful tools when creating out-of-the-box solutions.
With these columns, we can manipulate other columns in the list item. Below are a few basic functions complete with details on how to utilize them.

There are some limitations, but we outline what they are and to work around them at the conclusion.

Basic Functions and Common Examples

1.
Dates

One common use for a calculated column is to create deadlines and reminders for date fields. For example, a custom calendar where the End Date is always seven days later than the Start Date. In that example we would create a calculated column
such that:

=[Start Date]+7



When using dates, adding to that date is done on a day-to-day basis. So in the formula
above, we add 7 days.



2. 'If' Statements 

Another common use is setting the value of the column based on another column, usually
a choice field. For example, we present the user with a checkbox. If they check the box, we want the status to be "complete", so we have the following formula:

 

=IF([Checkbox]=TRUE,"Complete","Incomplete")

In If Statements, the condition comes first, then the true case and finally the false case.

3. Boolean Operators

Sometimes our IF statements can get complex. To help us along the way, we have Boolean Operators. For example, in a column called Favorite Team, a user selects between SpursRedsCowboys andBengals.
We want to determine what state they are probably from, so we have the following formula:

 

=IF(OR([Favorite Team]="Spurs",[Favorite Team]="Cowboys"),"Texas","Ohio") 



Also at our disposal are 'AND'
and 'NOT'.
All of these encapsulate their conditions with parentheses and separate them by commas.

4. The HTML Trick

SharePoint pages that utilize Query Strings are very powerful. These pages allow us
to create one page that automatically filters based on a user selection. Through that we can create efficiencies and standardization.
How do we navigate to those pages? We can do this through a calculated column and an HTML trick.

Assume we have a list of Projects with a field for Title. We also have a Query String page called Project and the query parameter is ProjectName. In our list, we want to create a calculated column that concatenates an HTML
string with the Title field to create our link. See the formula below:

 

=CONCATENATE("<a href="http://server/sitename/Project.aspx? ProjectName=",Title,"</a>")

This formula brings together a typical anchor tag that will create a link to our page with the Query String properly set. The real secret sauce to making this work though is returning the formula as data type Number. This will convert the text to HTML. Now
we input this column on a page in a list view and we have all of our Project Dashboard links! Consider using this also for images that are based on a calculation to display indicators.

SharePoint Calculated Columns 分类: Sharepoint 2015-07-09 01:49 8人阅读 评论(0) 收藏的更多相关文章

  1. Removing Columns 分类: 贪心 CF 2015-08-08 16:10 10人阅读 评论(0) 收藏

    Removing Columns time limit per test 2 seconds memory limit per test 256 megabytes input standard in ...

  2. 网站通用登录模块代码 分类: ASP.NET 2014-12-06 10:49 615人阅读 评论(0) 收藏

    1.HTML部分:     <form id="form1" runat="server">     <script src=".. ...

  3. C/C++的四大内存分区 分类: C/C++ 2015-05-09 01:36 163人阅读 评论(0) 收藏

    导读 正确的理解C/C++程序的内存分区,是合格程序猿的基本要求. 网络上流形两大版本内存分区,分别为: 1. 五大内存分区:堆.栈.全局/静态存储区.自由存储区和常量存储区. 2. 五大内存分区:堆 ...

  4. max_flow(Ford-Fulkerson) 分类: ACM TYPE 2014-09-02 01:50 110人阅读 评论(0) 收藏

    #include <cstdio> #include <iostream> #include <cstring> #include<queue> usi ...

  5. 8大排序算法图文讲解 分类: Brush Mode 2014-08-18 11:49 78人阅读 评论(0) 收藏

    排序算法可以分为内部排序和外部排序,内部排序是数据记录在内存中进行排序,而外部排序是因排序的数据很大,一次不能容纳全部的排序记录,在排序过程中需要访问外存. 常见的内部排序算法有:插入排序.希尔排序. ...

  6. hash值的计算与转换 分类: ACM TYPE 2015-05-07 17:49 36人阅读 评论(0) 收藏

    #include <bits/stdc++.h> using namespace std; const int MAXN = 100; const int X = 3; long long ...

  7. hadoop调优之一:概述 分类: A1_HADOOP B3_LINUX 2015-03-13 20:51 395人阅读 评论(0) 收藏

    hadoop集群性能低下的常见原因 (一)硬件环境 1.CPU/内存不足,或未充分利用 2.网络原因 3.磁盘原因 (二)map任务原因 1.输入文件中小文件过多,导致多次启动和停止JVM进程.可以设 ...

  8. Adding a WebPart to a SharePoint 2013 Master Page 分类: Sharepoint 2015-07-08 01:03 7人阅读 评论(0) 收藏

    On SharePoint 2013 you can not add the Web Parts to the master page the same way of 2010. Please use ...

  9. Rebuild my Ubuntu 分类: ubuntu shell 2014-11-08 18:23 193人阅读 评论(0) 收藏

    全盘格式化,重装了Ubuntu和Windows,记录一下重新配置Ubuntu过程. //build-essential sudo apt-get install build-essential sud ...

随机推荐

  1. iscroll双重滚动,向上滚动隐藏一部分,下拉后显示

    最近项目需求:下面是页面,当用户向上滚动时候,[隐藏的]部分也向上滚动直至消失,这时候[标题]和[搜索框]在最顶部,而[内部的]可以继续滚动,而当[内部的]滚动到最顶部时候,也就是[这个是内部1]时候 ...

  2. CentOS 6.3 安装过程

    1.放入光盘 2.安装欢迎界面 进入安装欢迎界面,有四个选项: 1.“Install or upgrade an existing system”:安装或升级现有系统 2. “Install syst ...

  3. CentOS 安装 lamp(转)

    一般情况下,安装的都是最新的正式版,除非你有特殊需求,要安装指定的版本,本文暂不讨论.从最基础的开始,一点点完成一个可用的 Linux 主机.这里就开始介绍如何在 CentOS 6.0 上安装 LAM ...

  4. float浮点数的二进制存储方式及转换

    int和float都是4字节32位表示形式.为什么float的范围大于int? float精度为6-7位.1.66*10^10的数字结果并不是166 0000 0000 指数越大,误差越大. 这些问题 ...

  5. ASP.NET 控件前缀命名规范

    标准控件 1  btn Button 2  chk CheckBox 3  ckl CheckedListBox 4  cmb ComboBox 5  dtp DateTimePicker 6  lb ...

  6. jq中数组应用的错误

    js中数组可以这样使用: <ul id="ul"> <li value="1">s</li> <li>f< ...

  7. 做为一名PHP程序员,应该关注的互联网IT大牛!

    俗话说:“读万卷书不如行万里路,行万里路不如高人指路”,做为一名新人,以后的路还很长,多年你的成就取决于今天的自己付出,选中自己的方向比什么都重要,关注大牛,向他们学习,才不会迷失自己! 1.惠新宸( ...

  8. 直接在 CSS 中引用 FONTAWESOME 图标(附码表)

    直接在 CSS 中引用 FONTAWESOME 图标(附码表) 因此我们如果不想用 Fontawesome 提供的类,只想在 css 里面引用图标的话,可以这样子,请自行脑补: .icon:befor ...

  9. bootstrap中如何让响应式图片(img-responsive)水平居中

    我们在用bootstrap排版内容的时候,有的时候在内容中需要图片水平居中对齐. 一般情况下,我们的图片都使用了 .img-responsive 类来实现响应式图片.如果需要实现响应式图片水平居中,那 ...

  10. intent参数的回传

    1. public class MainActivity extends Activity { private EditText editText1, editText2, editText3; pr ...