Friday, March 5, 2010

Grouping with multiple selection checkbox

In SharePoint list by default we can't group Choice field if it allows multiple selections (checkbox).To group by a Choice field which allows multiple selections (checkboxes), convert the Web Part to a Data View using SharePoint Designer, then apply grouping by given steps:
1. From the "Common Data View Tasks" menu for the Data View Web Part, select "Sort and Group:" from the options to open the Sort and Group Dialog, add any field into the Sort Order section to activate the "Edit Sort Expression..." button. Click the "Edit Sort Expression..." button to open the Advanced Sort Dialog.
2. From the list of fields, add the Choice field, and make sure that the field reference is the only value in the "Edit the XPath expression" input.
The field reference should begin with an @ symbol followed by the column name of the SharePoint column/field (example: @Location). Preview box will show values of the column.

3. Press OK on to close the Advanced Sort Dialog. Select the Choice Field from the list of fields in the "Sort Order:" box, then select "Show Group Header" under Group Properties. This will result in items being grouped by the value in the choice field which allows multiple selections.

Hope this help.

Nilesh

Wednesday, November 4, 2009

SubSite to Site Collection

Lets consider a scenario where a subsite (web) becomes substantially larger and you wish you could have a separate content database and hence decide to have a site collection (top-level site) instead of a subsite and you also want your users to continue browsing the same way they were doing earlier.

e.g. You have a subsite called TestSite http://ServerName/global/it/testsite. Now you want TestSite to become a Site Collection as you want to host it in a separate content database.

Here is the steps to confgure -

- Login with SharePoint Service Account (Farm Account)
- We have a subsite at http://ServerName/global/it/testsite
- STSADM -o export -url http://ServerName/global/it/testsite -filename C:\testsite.cmp -includeusersecurity -versions 4 (Make sure C:\ has got sufficient space to hold export for the TestSite)
- Delete the subsite http://ServerName/global/it/testsite
- Created an 'Explicit inclusion' at /ServerName/it/testsite from Central Administration > Application Management > Define Managed Paths
- Create a new site collection using stsadm –o createsiteinnewdb command > Choose /ServerName/it/testsite and create a site collection with a blank template
- STSADM -o import -url http://ServerName/global/it/testsite -filename C:\testsite.cmp -includeusersecurity
Browse to http://ServerName/global/it/testsite > Path looks exactly like previous subsite and the site is successfully imported and now testsite is a site collection.

Syntax for stsadm –o createsiteinnewdb
[More Info at http://technet.microsoft.com/en-us/library/cc262407.aspx]

stsadm -o createsiteinnewdb -url -owneremail someone@example.com

[-ownerlogin] [-ownername] [-secondaryemail] [-secondarylogin] [-secondaryname] [-lcid] [-sitetemplate] [-title] [-description] [-hostheaderwebapplicationurl] [-quota] [-databaseuser] [-databasepassword] [-databaseserver] [-databasename]

Note: The above method is recommended only for team sites. For sites with Publishing Feature activated there are some limitations with STSADM export / import and hence above operation may fail with an error message like “Data at the root level is invalid”. Read more here: http://blogs.technet.com/stefan_gossner/archive/2009/05/27/limitations-of-stsadm-o-export-import-related-to-publishing-sites.aspx

Tuesday, July 7, 2009

Office SharePoint Server Search Service stuck in stopping

Yesterday morning I saw some error in event log related to search. So I restarted search service and it got stuck in stopping, so I disabled search service and restarted server and started service, now it get stuck in starting. I tried to run "stsadm -o osearch -action stop", as lots of people suggested, but no help. Finally, I changed the “Log On As” to Local System, disabled the service and rebooted server. Once server started, re-enabled the service, started it, stopped it. Its working good. Now In central admin search service showing stopped, I restarted from there with service account. wow.. Everything perfect.

Now my next step was to figure out the reason of errors logging into event log. I reset everything, grant the WSS_WPG group Read and Write permissions on the tasks folder of search server. Now everything back to normal.

Hope my experience help others.

Nilesh