SharePoint Tagging Exposed

I'm sure all of you have seen the new tagging feature of SharePoint.  This particular feature is a part of the User Profile Service Application AND Metadata Service Applications.  If you don't have one of these created, then you simply won't get the ability to do tagging.  If you do however, you can tag things as a generic "I Like It" or something more specific like "Awesome".  I have had a few different questions asked of me over the past few months and here I'll answer them all:

#1 If a user tags something, will other users see the tag?

ANSWER: Depends!  There is a checkbox when you attempt to tag an item.  If you check it, it will save the tag specifically for you and no one else.  If you do not check the box, then when some goes to tag the same item, you will see a suggested tag list made up of all tags that have been placed on that item.

#2 If a user tags something, will they see that tag indexed in a search for the item?

ANSWER: No, I have not gotten SharePoint or FAST Search to index the tags 🙁  This can certainly be setup with a custom iFilter or extend point in FAST Search content processing pipeline, but it doesn't look to be out of the box.

#3 As an administrator, how can I search on all the tags that have been created?

Tags are saved as Metadata terms in the Managed Metadata Service Application that is assigned to the web application you are working with.  You can simply view all the terms under the "System->Keywords" group of your MMS service application.   You can also run the following query on your MMS database to get a listing of the tags and who "tagged" it:

 SELECT
      [ObjectUniqueId]
      ,[ObjectId]
      ,[Label]
      ,[Owner]
      ,[CreatedTime]
      ,[LastModifiedTime]

  FROM [ECMChangeLog] ecl, ECMTerm t, ECMTermLabel etl
  where
  ChangeType = 1
  and
  ecl.ObjectUniqueId = t.UniqueId
  and
  ecl.ObjectId = etl.TermId 

#4 How do I query  what has been tagged?

ANSWER: All items that have been tagged are not stored in MMS, but instead in the UserProfileServicesApplication_SocialDB_* database and in the SocialTags table.  A simple query of that table will give you what you are looking for.  Other helpful tables include:

  • SocialTagCloud_Everyone
  • SocialTagCloug_EveryoneByUrlBase
  • SocialTags
  • SocialTags_ChangeLog

#5 Are tags filtered (as in bad words like *bleep*)?

ANSWER: No, and ForeFront doesn't filter them either (reference this post).

#6 Can tags be filtered?

ANSWER:  To answer this question, one must analyze the architecture of the tagging system.  Since all the tag keywords are stored with MMS, the question then becomes, can I filter MMS?  Looking at the structure of the MMS tables, we have:

  • ECMTerm
  • ECMTermDescription
  • ECMTermLabel
  • ECMTermProperty
  • ECMTermSet
  • ECMTermSetMembership

The value for the term is actually stored in the ECMTermLabel property table.  Check out my new product that does SharePoint Social Filtering : http://www.sharepointfilter.com

#7 What does the "Tag Cloud" web part do?

Being that SharePoint doesn't have any filtering…this web part can cause some pretty nasty HR problems.  As long as your users are doing what they are suppose to be doing, then this simply queries all the tags in the Metadata store and displays them.

Enjoy!
Chris

PowerPivot and Excel Services

While working with getting PowerPivot and Excel Services working, I ran into this very annoying error:

ServerSession.ProcessServerSessionException: An exception during ExecuteWebMethod has occurred for server: http://servername:32843/811dd9f4d4ae48779f1dc7a03ba5d555/ExcelService*.asmx, method: GetHealthScore, ex: Microsoft.Office.Excel.Server.CalculationServer.Proxy.ServerSessionException: An error has occurred. —> System.ServiceModel.FaultException`1[System.ServiceModel.ExceptionDetail]: The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040) (Fault Detail is equal to An ExceptionDetail, likely created by IncludeExceptionDetailInFaults=true, whose value is: System.IO.FileLoadException: The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)    at System.Reflection…    

Nothing in the event log…only this error with no reference to the assembly name or anything…annoying.  I found this nice post about debugging these type of errors:

http://blogs.msdn.com/b/suzcook/archive/2003/05/29/57120.aspx

You must download the SDK to get the tool:

http://www.microsoft.com/downloads/details.aspx?familyid=6B6C21D2-2006-4AFA-9702-529FA782D63B&displaylang=en

After installing, I wasn't seeing any binding errors.  In the documentation, you're suppose to restart the services that are using .NET after setting the logging.  I rebooted the server and the error didn't return…weird.

Chris

PowerPivot and Claims based authentication

Unfortunately, I have NOT gotten this to work.  Only on a web application that has "Classic Authentication" set has it worked.  If you setup a web application to have claims based auth with both a "Forms" and a "Windows" login capability, the PowerPivot code will fail in its login method:

<nativehr>0x80070005</nativehr><nativestack>OWSSVR.DLL: (unresolved symbol, module offset=00000000000BB1EC) at 0x000007FEEFEFB1EC mscorwks.dll: (unresolved symbol, module offset=00000000002CF777) at 0x000007FEF62BF777 Microsoft.SharePoint.Library.ni.dll: (unresolved symbol, module offset=00000000000E7BAA) at 0x000007FEF23A7BAA Microsoft.SharePoint.ni.dll: (unresolved symbol, module offset=0000000001A5D823) at 0x000007FEEC87D823 Microsoft.SharePoint.ni.dll: (unresolved symbol, module offset=0000000001AD201F) at 0x000007FEEC8F201F </nativestack>Access denied.

Only way to get this to work is to reset the web application to "Classic Authentication" and then the code works.  This is with the latest cumulative updates applied.

Another blog post by Denny mentions a bit more into this, but the code should work as it is calling the object model to simply update the workbook in the list on the site 🙁

Chris

PowerPivot and SharePoint Farms

When installing PowerPivot in your farm, you will have to manually add the following line to your web.config SafeControls section of EVERY front end server, you will also have to add this back everytime you make a change via the Web Application settings page in Central Administration:

<SafeControl Src="~/_layouts/powerpivot/*" IncludeSubFolders="True" Safe="True" AllowRemoteDesigner="True" SafeAgainstScript="True" />

If you don't do this, then you will get this error:

“The referenced file ‘/_layouts/PowerPivot/ReportGalleryView.ascx’ is not allowed on this page."

This should have been done in the Solution install, but they missed that step.  Hopefully next version of the .wsp will contain the addition

Special thanks to PowerPivotGeek.com for the helpful hint

Chris

Regional Site Settings and Indexed Columns

What I believe to be a new change to SharePoint 2010 is the addition of some error checking around Regional Settings and indexed columns in lists. When you try to change the regional settings and sort order to something with a different collation type (sorting based on a-Z0-9, or 'a' is bigger than 'A' type of stuff), you will get an error about the indexed columns.  Being that I have turned on all site and site collection features, several lists have been created with indexed columns.

Moral of the story is, you MUST set the sort order of the site FIRST, before you add any indexed columns and turn on any site and site collection features.  If you don't, then you are in for a few hours of work to remove them and then add them all back!

Chris

SharePoint 2010 Document Id Service

In working with the document id service in one of my labs I found some interesting "features" of this new SharePoint 2010 feature.

  • When you activate the Site Collection Feature, you MUST wait for the timer job to complete BEFORE you change the site prefix.  If you move to fast for SharePoint and you change the site prefix, you will HOSE the site collection timer job setup.  I have found no way to fix this.  You will never see the Document ID column show up in the libraries.
  • After the timer job runs, if you want to change the prefix, you must update each item before the ID resets. For some reason, it is not changed via the timer job 
  • The format of the out of box ID Provider is SITEPREFIX-LISTID-ITEMID where LISTID is the autoincrement integer value for each list that is created on a web and the ITEMID is the autoincrement integer value for the item in the list
  • ID's are ONLY generated for "Document" content types…this is LAME.  I want all documents that inherit from "Document" to get an ID.  SP Team, this is easy…check for the Content ID lineage prefix of 0x0101 and simply assign the ID!
  • You can create your own Document ID Provider if you don't like this particular ID generation (part of my SharePoint Server Dev course)

Document ID Service has a ways to go, but it will get there!
Chris

SharePoint 2010 Column and List Validation

Another interesting feature I have found with column and list validation.  This feature works as described, but unfortunately only for NEW items.  If you enable column or list validation AFTER items have been added to a list, you will get an annoying error telling you the item was updated previously.

This does not happen on a new item addition.  Basically this means you have to create all your columns and validation BEFORE you start adding any items to that list/library!

Chris

SharePoint Designer 2010 Workflow Bug (Check out causes Exception)

I was doing a demo today around SharePoint Designer 2010 workflows and found a bug in the design.  When you create a workflow and want to edit the xoml file for the workflow, you must check it out.  Why would you do that you ask?  Well, the Designer Interface is far from perfect and you may need to move a step around in case you didn't realize you started to sub-nest your steps. The only way to do this is to edit the .xoml file.  In order to edit the .xoml file, you must "Check Out" the file first.  After you check it out, you can then edit the file in Designer via the XML Editor.

Saving the file but not "Checking It Back in" will cause the file to lose resolution to the SharePoint workflow code.  This will cause the following error in the log files:

System.ArgumentNullException: Array cannot be null.  Parameter name: bytes     at System.Text.Encoding.GetString(Byte[] bytes)     at Microsoft.SharePoint.Workflow.SPNoCodeXomlCompiler.CompileBytes(Byte[] xomlBytes, Byte[] rulesBytes, Boolean doTestCompilation, String assemblyName, SPWeb web, Boolean forceNewAppDomain)

Checking the file back in will allow the workflow to execute again.  

RESOLUTION:  A check out should cause the workflow to be unpublished. You would then need to save and publish it again after check in

 

Document Set Metadata – How does it work?

I had a student ask me the other day, does a document set get the metadata at the document set level?  I didn't know the answer…until now!  Let's start with a simple search on sanspug.org for "docset", we get nothing

Enable document sets in the site collection via "Site Actions->Site Settings->Site Collection Features->Activate Document Sets". Create a document set called "My Document Set" with a column called "Custom"

  • Create a new column called "Custom" in the document set 
  • We then need to setup some sub content types that the document set will contain via the "Document Set settings" link on the Document Set management page
  • Assign the Document Set to a library (with allow management of content types enabled)

Create a new instance of the Document Set with the "Custom" column filled in with "docset"

  • Re-index the content via the Search Service Application

Re-running the orginal search, we get only the document set:

Running a search for a sub document we get both document set folder and the document back:

So that begs the question…why doesn't Document Set metadata filter down to the sub items?  I think it should, but in the current version, it doesn't seem too with out some magic.

You may be asking the question what are "Shared Columns":

Well, you would think maybe it would cause the metadata to cascade down, but it doesn't, it only adds the column to the sub documents, which is weird in the first place because every time you add a content type, all the columns are added to the entire list anyway!

UPDATE!  A comment posted earlier pointed out there is a Timer Job Service that runs to update the metadata in the subcolumns.  Firing this job will supposedly update the sub document data.  However, I found that it doesn't for my Farm.  It would also make sense that your sub-document content types have a column with the same name as the document set level (if you didn't do the Shared Columns approach) or I'd guess this Timer Job would not do anything.  None-the-less, even after adding the column to the sub level docs via Shared Columns and the sub content types, the Timer Job still didn't update them 🙁  Still some bugs to be worked out here…

http://technet.microsoft.com/en-us/library/cc678870.aspx

So the answer to the students question is no, a document set folder does NOT cascade its metadata to sub documents by default, it has to be updated by a Timer Job (supposedly)!

Have fun exploring!
Chris