Functional SharePoint
High level thoughts on SharePoint, real world edge cases and other tips & tricks for SharePoint
Thursday, June 6, 2013
How to start a workflow on a document in a SharePoint Document Library that needs the metadata of the document
After some trial and error I figured out why: a document already gets created in a SharePoint document library after you click OK to upload it and before you set the metadata. When you set and save the metadata in the second step of the upload, that's considered a change to the document. So if your workflow needs that metadata and you start it on document creation, it will not work. Instead, you have to kick it of on document change.
As a side note: if the workflow needs certain metadata that is not mandatory, you should put a condition on your workflow that the needed field should be populated.
I hope this saves other people the headache it gave me!
Tuesday, May 22, 2012
How to put a calculated value in your list title column
In the regular SharePoint 2010 interface you can't change the type of the Title field from a single line of text to a calculated column. But this where the most awesome feature of SharePoint 2010 (in my humble opinion) comes in: customizing the form of your list with InfoPath 2010. Lets walk through the steps:
- Create your list in the SharePoint 2010 interface. Let's call it the "Weekly Facility Incident Report". It has the following columns:
- Week ending (date), mandatory field
- Facility (choice field, choices: A, B and C), mandatory, single choice only
- Notes (multiple lines of rich text)
- Days without an incident (number)
- Now go to the list and click on the List tab in the ribbon. Here you'll find the button "Customize Form" with which you edit the form of the list with InfoPath 2010:
- Clicking the button opens the form in InfoPath:
- Now you can right click the Title field to display it's properties:
- Now click the function button next to the default value:
- In this menu you can write text, combine fields and use functions. Let's make the Title always something like this: "Weekly incident rapport for Facility <name> for week ending <date>. It's best to only use fields that are mandatory for the list. These are the steps for creating that default setting:
- Click on "Insert Function" and under Text, select the "concat" function (to concatenate multiple elements):
- Now add the first piece of text by single clicking on the first underlined section and typing the text:
- Double click to add a field on the second element and select the Facility field:
- Add the next piece of text by clicking on the 3rd element, add a comma, click the Insert Function button and select the substring function (to display only the date of this date time element):
- Double click the first insert field element in this function and add the Week Ending date:
- To only show the date (not the time), go from position 1 for 10 characters:
- Click OK and the formula is now saved for the default value:
- In the form itself, you can now select the row with the Title field, right click and delete it (because it will be set by default anyway):
- Now, to publish the form, click the Quick Publish button:
- Now the form is published and when you create a new item in the list, the title is set automatically:
Wednesday, August 17, 2011
How to enable rich text formatting on 2010 list items
Then I realized that there are 2 ways SharePoint 2010 can display the View and Edit forms of List Items: in a Dialog that pops up (which is the default for any list in 2010) or in a new page.
When the list is configured to use the "new page" view and you choose to edit the item, the Ribbon pops up with the option to insert pictures, links etc. when you place your cursor in the Body of the Announcement:
The user now also has the option to do enhanced formatting on the text using this tab in the ribbon:
So if your users need to add more then just text to Announcements or other types of lists items, you should take the following steps for those lists:
- Go to the List Settings
- Select Advanced Settings
- Scroll down to the bottom to the Dialog item
- Select No for "Launch forms in a dialog?" and select OK:
Sunday, May 29, 2011
Prototyping in SharePoint
- Who will be using the solution
- What do they need to be able to do on the solution
A SharePoint prototype should only contain out of the box functionality (so anything you can do in the regular SharePoint interface), no branding (except for maybe a background color and logo change) and very little data and/or documents (just enough for demonstration purposes). Unless security and/or localization are important requirements, not too much effort should be put into defining roles and audiences. But the prototype will be fully functional so stakeholders and users will be able to play with it and get a feel for where the solution is heading and provide their feedback. If it is hard to get clarity of high level requirements and there could be multiple solutions, it may even be advisable to build more than one prototype so that the stakeholders can decide which route they like best.
When the prototype has been commented upon and approved you can start work on developing the final solution knowing that the end result will fit the needs of the organization and will not come as a surprise to the users.
Tuesday, May 24, 2011
How to preserve Digital Signatures when moving documents between libraries
There is however a big drawback to this approach. If your document(s) had metadata and/or approval statuses in the original library and you want to retain this information when moving it to the new library, this approach will not work as metadata is only retained if you move documents within SharePoint between libraries with identical columns.
So it's a choice between getting all documents signed again or resetting the metadata and approvals. In this case I decided with the client to retain the Digital Signatures and use this product to do batch check-in and metadata updates for the files we'll upload to the new library.
Wednesday, May 18, 2011
Going from the shared drive to SharePoint
For the longest time, shared drives were the way that enterprises preferred to store and share documents. The down side of using shared drives is that there is no version control for documents, no search beyond the filenames, and the folder structures get convoluted over time, making it very hard for users to find and work with the right documents. Using SharePoint for your document management can resolve all of these challenges.
As Documents Management comes out of the box with SharePoint, many organizations that implement SharePoint for the first time don't put too much thought into setting up their document libraries. They will often focus on the look and feel, the colors, put in the company logo, setup a few libraries, maybe add some metadata columns and open it up to their employees. But what they often find is that the acceptance of SharePoint is very low. This could be because:
- The shared drives are still available
- There is no clear ownerships and/or governance of document libraries so users keep creating new folders to store documents that really belong in a different spot
- The document library and folder structure is/grows just as convoluted as the structure of the shared drive was but with a different structure (and SharePoint doesn't show the tree view as in Windows Explorer) so users have even more trouble finding documents
- SharePoint Search isn't setup properly
- Setup a clear library structure with a limited set of relevant metadata tags
- Define clear governance of the libraries and makes sure only a limited number of users can create folders
- For large libraries, use one or two levels of grouping to get a better overview
- Make sure that search works properly. When it does, users will even be able to search in the content of all documents in the libraries
- Train users on how to use the libraries, use sorting, filtering, checking documents in and out and using search to make sure they understand the advantages of using document libraries over the shared drives
- Migrate all data out of the shared drives and close them for good























