Using the default values of columns within the document library is a very nice way to support our users. It enables them to add documents easily and have (some or all) of the metadata added to the documents automatically. This is very useful when you’re using the Windows Explorer and/or drag option to add files.
When working with these default values I’ve noticed some interesting aspects.
First of all, if you want to use default values within the library, use the Default Values option of the library. This might sound like an open door. However, as you can also set a default value at the site content type level, some people are tempted to use that default value. I’ve noticed that the document library option takes precedence.
One other thing is a bit more scary. When working on several document libraries, I noticed that it wasn’t possible to change the default values. Instead, I was treated to a “An unexpected error has occurred” message. Very nice…. Not……
But, this can be solved. Hooray!
And it’s easy enough.
SharePoint stores the document library default values in a file named \forms\client_locationbaseddefaults.html. When this document is corrupt or contains invalid values, than you will see the error message. How to solve this? Easy…
- Open the document library using Windows Explorer;
- Make sure that in the Windows Explorer settings, the option “show hidden files” is selected;
- Go to the Forms folder;
- Rename the file client_locationbaseddefaults.html to something like client_locationbaseddefaults.old
- Go to the Default Values option in the document library and you will be able to add defaults.
Do not delete the file mentioned….. SharePoint will simply recreate the file before you have time to change the values!
Thanks for this article it worked a treat for me much appreciated
Great article Albert. Good job! After spending multiple hours of troubleshooting it solved my issue for one of our customers.