<img height="1" width="1" src="https://www.facebook.com/tr?id=730305433807073&amp;ev=PageView &amp;noscript=1">
Book a Demo

Advent Calendar Door 14: Setting default and initial field values in SharePoint forms

Setting default and initial field values in SharePoint forms

In today’s skybow Advent Calendar, again one of the classics: prepopulating values in SharePoint forms, based on current data, user, and context. It is not possible in out-of-the box SharePoint list forms, but it is a very simple task both with skybow Solution Studio and skybow Rich Forms.

Let’s try to imagine just one of the possible scenarios: in a SharePoint list, there is a text field called “Location”. When a new form of that list is displayed, the “Office” property should be read from current user’s profile, and the field “Location” should be set to that value, locked for editing, so that the user cannot change it.

Those are the steps we are going to follow in order to make this work:

  1. Open the form where the field that should be initially set is located, and select the field
  2. Click the Expression Builder icon besides the “Initial” value in the “Behavior” tab
  3. Select the “Office” user profile property, under the “User” context object, and save the expression
  4. Set the “Enabled” expression on false, to make the field read only.

enable field skybow Rich Forms.png



Adis Jugo

Written by Adis Jugo

is Director of Product Technology at skybow, and a software architect with over 20 years of experience. Adis is double Microsoft MVP (Most Valuable Professional) for Office Development and for Office Servers and Services. He first met SharePoint (and Microsoft CMS server) back in 2002, and since 2006 his focus was completely shifted towards architecture and development of productivity solutions, now based on the Azure, Office 365 and SharePoint technologies. Adis is an internationally recognized speaker with over 15 years of speaker experience, speaking at various Microsoft, Community and SharePoint/Office 365/Azure conferences worldwide.