Categories
Skip Navigation Links

Recent Articles

Location based default value in SharePoint

We can set a column default value in the SharePoint list and document library but there’s one OOB feature only in the SharePoint document library using which we can set a column default value, based on folder/location, we want to create the row/list item in.

The usual way of setting column default value

  1. Go to library settings
  2. Click on the column you want to set the default value of
  3. Go to Additional Column Value >> Default value.
  4. set column default value
  5. You can set your default value in the form of plain text or calculated value over here. You can see the default value when the list item is created
  6. default value on new item

Location-based column default value settings

  1. Go to library setting >> click on Column default value settings
  2. Column default value settings navigation
  3. Click on the column you want to set the default value of.
  4. location based default value settings
  5. Now, create a new row item.
  6. location based default value on new item
  7. Document1 was created before setting location-based default value so you can see the default value that we set at the list setting level. 

    BUT for Document2, you can see the value that we set in location-based settings.

  8. NOTE:

    • The location-based default value will always take precedence over the value set at the column level. If you haven’t set a location-based default value for a particular location/folder, then it will just inherit from one level above.
    • So, when you create an item at the root level, you will have a different default value and when you go inside (e.g. Finance Folder in the above example) and create a list item, it will have a different default value. COOL Feature!!!

The background picture of the location-based default value

It is very important for us to know exactly how Microsoft SharePoint is keeping this setting in the background.

  1. Go your SharePoint designer and open your site
  2. Click on All Files from Left Navigation
  3. Click on your Document Library in which you have set the default values.
  4. Click on Forms.
  5. In this panel, you will find a file client_LocationBasedDefaults.html. Open it. I have modified the XML for better reading.
  6. client_LocationBasedDefaults
  7. As you can see, there are two different locations and they are having two different default values.

Conclusion:

When we are working in records management and relying on Human Inputs heavily, then we may end up getting some data-entry issues. At that time, setting default values can be very helpful.


We value your Feedback:

Page URL:

Name:

 

Email:

 
 

Suggestion:

 

© 2021 Code SharePoint