Thursday, April 14, 2011

Content Organizer – Drop off library

Hi

A new cool feature that has been added to SharePoint 2010 is content organizer. It actually helps to have a similar method like what we had in MOSS 2007 as record center.

Content organizer allows administrator to define certain rules for the documents to move from one library to another library. This actually helps to redirect specific business documents at certain locations. Total number of documents to be uploaded in library and when you created automated folder etc. are handled by content organizer feature itself.

To use this functionality we first need to activate feature called content organizer and this feature is in the site actions, manage site features.



Once you activate this feature, you get two more options under the site administration which is content organizer settings and content organizer rules.




Now before diving into this feature, let us understand what this feature can do more. This feature only works with content types. So you cannot use this feature to manage any list items, it works only for the documents.

Another thing to note here is that along with two new features, it also adds one more document library called “Drop off library” where user can drop their documents and then routing rules will route those documents based on the rule being set.

Content Organizer Settings is where you configure whether to route documents that are added to the site collection based on rules. Any changes made here affect routing for the entire site. Content Organizer Rules is where you go to create the rules that are used when routing documents. Any rules created here are used to route individual documents based on metadata attributes that you choose.

Now click on content organizer settings and let’s explore its options. The very first option is redirect user to the drop off library.



This means if it’s turned on, then even if user uploads any document to any library in the site, he will be redirected to drop off library to upload the document. If the drop off library has metadata property, then it will ask to fill in those properties which are metadata of drop off library not the library where user tried to upload the file.

There are some pros and cons of this approach, and when you start working on it in real scenario; we will have more discussion on it based on your questions.

Second option is sending to another site. If this has been checked, then we can create a rule which also can redirect the upload to the document library sitting in the other site.

Folder Partitioning: This is very important settings here. We can configure how many items we want to allow and after that start creating folders and replace % 1 with date and time.

Duplicate submission: What if the same document gets routed automatically; then uses SharePoint default versioning or appends the unique character at the end of the file name.

Preserving context: if this property is checked, then the original audit logs and properties for a document are preserved after the document has been routed. It’s important because you can have all of the historical information about an item retained with it. If it is retained, you can click on Compliance Details from the View Properties page of an item.

Rule Manager: very important property to set. Even if user has manage lists permission on the site then also cannot create rules or alter the rules. Any user that wants to perform rule operations must be added here. If the user’s name is in rule manager then only he will be able to manage rule settings for this.

Now then we have set all properties of organizer settings; let’s proceed and set up some rules in organizer rules settings. Let’s create a rule which will route excel documents to a new library in the site.

Give rule a name and then decide the priority. Priority means if document matches more than one rule then these rules are evaluated based on priority. If the rule is inactive then this rule is not evaluated at all.




As you can see it can only be done on content type, we will go with document content type. Each group has its own specific types which is very useful. We can define ruled for audio, video, images etc. by using digital asset content types. Check all the options to see. As of now, we will go with Document content type.



Set all above properties; and click on ok and you will see one rule being set in the organizer rules.



Now it’s time for action; let’s go to Drop off library and upload a document. When upload window opens, you can notice one status message saying that this is using the content organizer rule settings.



The moment you upload, it shows your screen for metadata of drop off library



Fill these details and submit it, you will see your document is now in destination library rather than in drop off library.

Wednesday, April 13, 2011

Relevant documents web part

Hi

We all know that there are many out of the box web parts available in MOSS 2007 and now more in SP 2010. Sometimes it is important to see what they offer. Recently I came across to a very good document management related out of the box web part which is relevant documents web part.

This web part was a part of MOSS 2007 and continues to be a part of SharePoint 2010.

The Relevant Documents web part displays documents that are relevant to the current user. This web part can show following;

Documents last modified by current user
Documents created by current users
Documents checked out by current user

So ultimately it becomes my checked out, my created, and my last modified documents.

This web part is under content rollup section in SP 2010 and under miscellaneous section in MOSS 2007 and these are the configurable properties.

Tuesday, April 12, 2011

How to use Group Calendar

Hi

We know how to use very calendar in MOSS 2007 and we also know that it was lacking one very basic fundamental functionality, which is the availability of people for whom you are creating an appointment or something.

Now in SharePoint 2010, we have an option to have attendees in the calendar list item as well as we can see the schedule of them as well. So that now we can see the availability of team members as well as conference rooms. We can also now have the conference room references in the calendar.

So now it is moving towards a bit of similarity with outlook calendars.

Let’s explore how it works.

First when you create calendar, it has nothing new in it. so go to list settings > General settings > Group calendar options, this will turn calendar into a group calendar.



Go back to calendar, and click on new. As you can see we can now see schedule of each person you add in attendees.



One more thing, now we also have an option directly to add event for a day. Click on Add button to add an appointment for 12th of respective month.



The real advantage of group calendar comes in when you merge two or more calendars with one and hence you would be able to see your all schedules in to one single calendar.

So see this in action, add one appointment to your any of the calendar in the site. Let’s say I have defined one event and check out the color is green.



Now go to another calendar where you want to merge this. Let’s go to Employee Calendar that I have in my site and check this out on left side when you are on that calendar. Click in Calendars in view.



When you click on it, it takes you to a page where you can add additional calendars. So go ahead and click on add new calendar.



Click on new calendar and give calendar a name and then click on resolve web URL, this will fetch lists to a drop down and select calendar from that drop down. Also you can configure the color in which you want to see those appointment. You can add up to ten additional calendars.

Now go ahead and add appointments in both calendars with same timings. And see what happens when you open the calendar in which you have added the additional calendar.



Now go to site settings and site features and find feature called “Group work List”. Activate that feature. Now go to calendar and then go to list settings >general settings and then check one new option in Group calendar option which is use this calendar for resource reservations. Turn it on.



Go to calendar and click on New, and you get this.



Click on reservations.



As you can see I have two resources conf room1 and conf room2. These options come from the list called resources. Your site should have the list named resources, if it does not have; then create one.

So as you can see, calendar has gone through a lot of enhancements in this version and certainly it is useful.

Monday, April 11, 2011

Rating in SharePoint Lists and libraries

Hi

One cool new feature that is now available in SharePoint 2010 is ratings for the list items as well as document libraries.

Now we can rate list items and documents and the other important thing is this can be searched as well. We can search items and documents which are rated between one and five; which is amazing.

To make this available, first you need to go to

CENTRAL ADMINISTRATION > System Settings > Servers > Manage services on server (by default it is Started)

Under CENTRAL ADMINISTRATION > Monitoring > Timer Jobs > Review Job Definitions > look for 'User Profile Service Application - Social Data Maintenance Job' and 'User Profile Service Application - Social Rating Synchronization Job'.

These jobs are scheduled to run every 1 hour.



You can change that anyways



Open any list, go to list settings and find ratings settings which are new in SP 2010.



Allow it and turn it on.



Once you add this, you get two fields in list items or documents item. Rating and Number of Ratings.



And then based on the timer job, you would be able to see your ratings and other ratings as well.

When you rate, it gives you an indication that your rating has been submitted and will be processed soon because it all depends on the timer job.



I hope you will enjoy this new feature in SP 2010 and use it in the search part as well.

Friday, April 8, 2011

Relationship in SharePoint Lists

Hi,

In this article we will see the new concept called relationship which was highly anticipated in SharePoint 2010 and which was lacking in MOSS 2007.

After a wait now it’s finally here with SP 2010. We can define the delete constraint over the lists. When we have a lookup column in child list pointing to a parent list and if we have defined the cascading delete constraint then we can allow deleting all child records when parent record is deleted or we can restrict deleting parent record when child record exists. This is the same behavior that we have in SQL Server delete constraint.

So let’s go and open our Employee Leave lists that we created for our earlier posts. If you have not gone through it, I would recommend you go through it to understand more concepts of SP 2010.

Go to list settings – Click on Employee ID lookup field which is pointing to Employee parent list’s Employee ID field and scroll down to find this.

Do remember that to enforce the constraint on field, that field must be indexed. If it’s not, SharePoint will prompt you and index it for you.



Here we have put in a restriction on delete that means if we go and try deleting record from Employee List; it should not allow us to do so. So let’s try that out.

Go to Employee List, and delete any existing record that has lookup item exist in Employee Leave list and see what you get.




Now define the same constraint of Employee Projects that we have in our site. And now try to delete item from Employee List and see what you get.



So what happens is when you have multiple lists having lookup reference to the parent lists, error indicates you list name one by one, not all lists at once. I mean here we should be expecting that error should say that item cannot be deleted because an item in the employee leave and Employee Projects list is related to the Employee list. But then this can be a cumbersome effort because we never come to know that how many lists are referring lookup.

Well, but we now at least have this functionality available ready.

If you have defined two lists which have lookup reference to the parent list and if one list allows cascading delete and one do not, then parent list item will not be deleted because one list does not allow cascading delete. And this is what it should be.

When every list allows cascading delete then when you delete item from the parent list, it delete all related records from all related lists which have lookup field referenced to the parent list field. It also actually shows you the names of all lists which have the association while you are deleting the parent item. Check this out.




It is showing Employee Projects as well as Employee Leave, click on Ok to delete all related items in child lists as well as parent item.

I hope now you will have a fair idea about the new relationship behavior functionality in SharePoint 2010.

Thursday, April 7, 2011

Related Lists in SharePoint 2010

Hi

We will see one of the new concepts from SharePoint 2010 which is related lists. We already have employee list with us. All we need to do is create two more lists. I am creating two lists just to show you an example. We can have as many lists we want.

Create Employee Leave list and go to list settings and create one column which is Empoyee ID and take it as a look up column from Employee list and field Employee ID. One new feature here is when you define lookup column. Now we have the ability to fetch fields from that item and display it in the list as well.




So now when you enter the data in the Employee Leaves and select Employee ID from lookup drop down, you get something like this.



So what happens is, here you would be able to see parent item details as well along with the actual list data.

Now go ahead and create one more list and call it an Employee Projects. Do the same thing, add columns and add EmployeeID column lookup to the Employee list and Employee Field.




Now add some data to this list. So what we have now is three list which are connected from Employee ID look up fields. Empoyee is the main list and then we have two lists with lookup to the Employee list employeeID field.

Open the List settings page of Employee List, create one view and call it a RelatedList view. Open the related list view and click on Site actions -Edit Page.

Go to options tab and then see we have new option called related list.




When you click on related list, it will automatically check all lists that have lookup to Employee List and here we have two lists and hence we will get two options.





Add both these lists and see what you have on the page. Now you have connected three lists and based on the selection of Employee item, you get the other two lists populated accordingly.

You will notice one two sided cross arrow symbol. Clicking on it will show related data in to the lists.

Wednesday, April 6, 2011

Column validation in SharePoint 2010

Hi,

Earlier in MOSS 2007, it was not possible to validate the value of the field at the time of entering or updating the value in the list items. We could do that, but we had to rely on handlers or custom fields.

Yes, still for some requirement we have to go with these options, but at least for the basic and indeed useful now we have something called column validation in SharePoint 2010.

I have one Employee List ready in my SharePoint site and I have added three columns to it. It has Joining Date, Leaving Date and weight.

We will see two things here. First is the field level validation and the other is item level validation. You can treat this as a custom field validation and event handler validation.

Go to list setting and then click on the weight and now we can see one new section which says column validation. So go ahead and add below condition and type in the user message that you would like to see when condition becomes false.




Click on ok.

Now being on the list settings page, you can see one more new option which is validation settings. Click on it to open a page.



In validation settings, you can actually compare one field with the other field from the list and then show a message to the user. Here in our list for example, we have two date fields and of course joining date cannot be greater than Leaving date. Hence we need to validate these two date fields.

Hence we put this formula inside it.



Now go to the list and add new item and enter weight less than 50 and enter joining date greater than leaving date and see validation triggering.



Now this is a cool new feature of SP 2010, isn’t it?

But yes do remember that we can have only one list validation, which is unfortunate i think and column validations are evaluated first and then list validation.

Tuesday, April 5, 2011

Add web parts to New, Edit and Display form in SharePoint 2010

Hi,

We all know that it is really easy to add web parts in the new, edit and display forms of a list in MOSS 2007. We can simply add ToolPaneView=1, ToolPaneView=2 or ToolPaneView=3 in the query string and we get a web part zones on the page to add web parts.

Well, in SharePoint 2010, we can still do that. You must be wondering that now that when we click on the NewItem or edit or display item, New window comes up. So how we can add them?

Idea is very simple and it is still as simple as it was in MOSS 2007. We can achieve the same in different ways.

For new Item right click and choose between Open in New Tab or Open in New Window. This will actually surpasses the form that pops up when you actually client on New Item link.



Or you can simple type in the web url / lists / {list name}/NewForm.aspx and then pass the toolpane parameters. Same goes for edit form. Use Editform.aspx?ID={ID} in new window and then use toolpane parameters to add web parts. Same way for the DispForm.aspx?ID={ID}.

And in case you want the forms even to open normally while creating, editing or displaying item, then go to list settings – advanced settings – dialogs and then select NO.

Monday, April 4, 2011

Unique column in SharePoint 2010

Hi,

In MOSS 2007, we do not have any option to set unique column value for the field in document library or list. We can still achieve that with the help of event handlers and adding some code in the ItemAdding event. But still there was no direct way to do it.

Now in SharePoint 2010, we have the built in functionality to enforce the uniqueness of the field. But yes do remember that the field must be indexed first before you want to set it as a primary key.

Well, just a quick question. Do we have anything as primary key in MOSS 2007? Yes, we do have and that is ID field in list or library. However that does not solve the purpose as it is just used to identify items and used heavily in coding purpose.

So let’s see how to go ahead with primary key in list field.

Create a list in SharePoint 2010 site and then create a field that you want to have a primary key. Go to list settings. Go to indexed columns and choose that column to be indexed.

You can index up to 20 fields per list as you can see in the screen shot. I have already created one index which is on EmployeeID field in the list.



When you create a field now then we have an option to enforce the unique value. This can be set only when you have made that column indexed. So if you have not indexed this column, SP 2010 will ask you to do it.



Once you set this field as unique key, then go ahead and add one value and try to add another with the same. It will not allow you to do so and show the message.






Unique field is case insensitive. So if you have Microsoft and MICROSOFT, it means same to the field. It is unique.it won’t allow you to save.

Same is enforced even when you update the item.

Supported Column Types
• Single line of text
• Choice field (but not multichoice)
• Number
• Currency
• Date/ Time
• Lookup (but not multivalve)
• Person or Group (but not multivalve)
• Title (but not in a document library)

Do remember that When you enforce uniqueness on a Lookup column, the list item in the target list can have only one list item looking up to it from the child list.

Result is out

Hi All,

Result is out and here is what we have got. Looks like people still not aware about what web matrix is and can do.




Share your SharePoint Experiences with us...
As good as the SharePointKings is, we want to make it even better. One of our most valuable sources of input for our Blog Posts comes from ever enthusiastic Visitors/Readers. We welcome every Visitor/Reader to contribute their experiences with SharePoint. It may be in the form of a code stub, snippet, any tips and trick or any crazy thing you have tried with SharePoint.
Send your Articles to sharepointkings@gmail.com with your Profile Summary. We will Post them. The idea is to act as a bridge between you Readers!!!

If anyone would like to have their advertisement posted on this blog, please send us the requirement details to sharepointkings@gmail.com