Wednesday, October 28, 2015

Calculated Columns in SharePoint List/Library

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 is basic example to update list item based on other column.Lets get started

Scenario: 


Lets Create a document library named "Shared Document" ,Business Owner have assigned to review document in Library.We will create 3 additional columns in library(one-Date Time Column and two-Calculated column).

           Column  Name       Data Type

          ------------                          -------------
          Yearly review Date Time

          Review Complete                 Calculated Column


          Review Not Complete           Calculated Column



 If Documents "Yearly review" is done then "Review Complete" should be filled with "Yes" and "Review Not Complete" should be empty


 If Documents "Yearly review" is not done then "Review Not Complete" should be filled        with "Yes" and "Review Complete" should be empty.

Follow below steps to create and add formula to library/list
    


Step 1 : Create Document Library 


Step 2 : Create Date Data Type Column named "Yearly Review" 


Step 3 : Create Calculated Column "Review Complete" with below formula

         
            Formula:  =IF(ISBLANK([Yearly Review]),"","YES")

Step 4 : Create Calculated Column "Review Not Complete" with below formula

         
             Formula:  =IF(ISBLANK([Yearly Review]),"YES","")

Step 5 : Add a document and observe the "Review Complete"  and "Review Not Complete" Columns.Below is sample screenshot for above scenario.



Thanks for Reading :)