How to Create Site Columns in SharePoint Hosted Apps

To create a custom list by content types or even to create custom content type first you have to add site columns for those columns which you want to add in list or content type.
It is very easy and short process to create site columns, let’s have a look

a) Right click project name -> Add -> New Item.

b) Select ‘Site Column’ template which belongs in ‘Office/SharePoint’ category, set name for the column and click the ‘Add’ button.


2) It will add Site Column in project, open Elements.xml file of the recently added column.


3) You can set Data Type of column and other attributes in Elements.xml file.

<?xml version=”1.0″ encoding=”utf-8″?>

<Elements xmlns=””>



Name=”Holidays”  => this Name is used by environment so can’t put any space between the name otherwise apps will not publish

DisplayName=”Holidays” =>This field value will display on UI so here you can keep space between name

Type=”Text”  => set datatype of column

Required=”TRUE” => set either column value should be mandatory or not

Group=”Custom Site Columns”>

<Default></Default>  => here you can set default value for column

<Formula>[mention formula here]</Formula>



Refer below link for attributes & Data type of columns.