Skip to content

SharePoint

How to Gather Windows SharePoint Services Requirements

Getting good requirements for a SharePoint project is in some ways more critical than for a project that’s based on more widely understood technologies. The fact that SharePoint isn’t widely understood by clients — whether internal or external — means the potential for misunderstandings is much greater. For this reason, it’s more critical to discuss each feature of SharePoint to understand of how the feature works out-of-the-box and to understand how the organization envisions those features. Whether you choose to design and architect your SharePoint technologies solution yourself or decide to work with an outside partner to perform the architecture and design steps, you’ll find that having a foundation in solid requirements makes the development process run smoother and results in a better solution for your business needs.

http://my.advisor.com/doc/16797 [Article removed from the website]

Harnessing Properties in SharePoint Search

Most users of SharePoint Portal Server rapidly become enamored with the ability to add new fields (containing meta data) to documents in the document library. All of the sudden it becomes possible to associate information to a file beyond the file name that we’ve been limited to since the beginning of the computing era.

Few users, however, have the opportunity to understand how this meta data is used by SharePoint for searching. This leads to problems when users decide that it’s necessary to use SharePoint Portal Server Search to search on information contained in a field that they have added. In this article you’ll learn how SharePoint uses document library fields to create properties that are searchable and how to enable searching on those properties.

Article reposted here: Retro: Harness Properties in SharePoint Search

SharePoint: Cannot complete this action. Please try again.

Another one of those lovely SharePoint error messages … This one leaves me wondering what I do when it doesn’t work the second time I try it.  (Or the hundredth since I’m getting it back from code running against the API.)

… I’ve got to get my library of least favorite SharePoint error messages up.

If anyone’s interested this one came up when trying to get SPWeb from SPSite.OpenWeb with a GUID … that is valid.

Rob

The SharePoint IRunTimeFilter is a good idea but the implementation…

Mike Donovan’s post got me interested in how IRuntimeFilter could be used to replicate SharePoint Portal Server audience/targeting feature in Windows SharePoint Services.  There are several situations I’ve run into where the SPS targeting is a compelling feature for Portal Server but the limitation of 10,000 areas was a problem.  (By way of reference, I also found Serge van den Oever’s reverse engineering of the interface which was very good.)
In thinking about the interface it also seemed promising as a potential way to secure web parts.  In other words, with an IRuntimeFilter running you could potentially turn off web parts for certain groups of users.  This might be effective at preventing them from seeing our using web parts from the gallery that some users needed but weren’t suitable for everyone.
However, the actual implementation of the interface appears to have a few challenges.  (I have a case open with MS PSS right now to verify some of these observations.  I’ll update this blog entry or more likely add a new one when I get more information.)
  1. The filter is only called when the IsIncludedFilter property in the web part has a non-empty (non-null value.)  In other words, you don’t get the opportunity to inspect every web part as it’s loaded, you only get to inspect those web parts with the property set.  This makes it useful for user configuration but not very useful as a “traffic cop.”
  2. The interface doesn’t specify any information about the web part itself.  It only returns to you a filter string that you presumably created with the user interface.  The challenge with this is that there is no way (I’ve found) to determine just which web part is trying to be displayed.  Again, maybe this isn’t an issue for users configuring things for themselves, but it seems awfully limiting.  One reason is because when a web part is exported and re-imported, the IsIncludedFilter property stays with it.  That means that if you have site-specific data in the IsIncludedFilter property it becomes invalidated when it moves to the next site.  This is a real problem when trying to move web parts between sites or punch out a template site.  (The Microsoft provided ListViewWebPart andListFormWebPart both exhibit problems when you try to move them from one site to another due to this same fundamental issue of using site/area specific property values.  This is why you are not allowed to export and import ListViewWebParts via the user interface.)
  3. The ValidateIsIncludedFilter() method, which is called when the property is saved is called all the time.  There’s no event which fires when the user adds the web part or changes the configuration.  This event fires every time the web part is saved.  This appears to be happening on every page load – which is a bad thing in and of itself that I don’t really understand.  Why would we be saving a web part back to the database every time it’s rendered?  It seems to me that this would be a huge performance problem.
  4. The IRuntimeFilter is only called in “personalization mode” The precise meaning of this eludes me – I can’t find the definition in the documentation.  However, based on observation it appears that it is only called in the personal view of the site.  (This would be the view that few people actually see first, only those who have the permission to personalize the site and have done so default to a personal view of the site – almost everyone gets a shared view.)  The net effect of this is that it’s going to require some more work to force people into a personal view by default when they view a WSS page.
  5. The IRuntimeFilter interface is only called for “global” web parts on a page.  That means if the user adds a web part to their page while in personal mode the IRuntimeFilter will never control whether it is displayed or not.As a sidebar, it appears that SPS enters personalization mode or the “my page” view by default since their IRuntimeFilter is turned on.  I tried playing with this and observed that when I put a SharePoint Area into edit mode and then switched to personal view all of my menus disappeared.  All I could do was return to Shared mode which would allow me to edit what web parts were on the page, etc.  Based on these observations it looks like SPS is actually putting the area into a personal view every time the page is loaded but they also don’t allow you to personalize the page.

So, I can probably replicate the SPS audiences using IRuntimeFilter if I can figure out how to force the WSS sites to default in personal view even for those without any personalization to the site.

However, without some way of inserting the web part storage key or some other value into the IsIncludedFilter property of a web part while it’s being imported, I’m not sure how to make this interface any more useful than the SPS application of it.  I’ve not found a way to inject properties to every web part as it’s added yet…

Is anyone else playing with this interface?

No Searching SharePoint Portal Pages — by default

Something I ran across the other day is that the default content index for Portal Content has an exclusion in it so that it won’t search the actual pages of the Portal.  If you have content editor web parts, or other content that you want to make sure that SharePoint does index, you’ll want to go into SharePoint and remove the exclusion for pages.  You can follow these steps to remove the exclusion

  1. Open the SharePoint Portal Server site
  2. Click on Site Settings
  3. Click Configure search and indexing
  4. Click Manage Content Indexes
  5. Hover over Portal Content, drop down the menu arrow that appears on the right, and select Edit.
  6. Click Manage rules to exclude and include content
  7. Find the entry in the list which is http://yourserver/*.aspx, hover over it, drop down the menu arrow that appears on the right, and select Delete.

The next time the portal content index is refreshed you’ll start getting content from the web part pages as well.

REST for Search.aspx

SharePoint’s support for REST (query string parameters) on the search.aspx (Portal Server Search/Search Results Page) is very powerful.  However, once you get past the basics of passing it a search string (k … short for keywords) the documentation gets a bit fuzzy.  Here’s one thing that I was able to do with search.aspx…

First, a few parameters…

Parameter Description
k Keywords – General Search
tp Type of document (I’ve found Person and Document very handy.)
s Scope — Think Search Scopes from the search drop-down list
pt Property — Any of the custom properties that SharePoint indexes. IFilters put these in.
d Date — apparently required when you’re searching for properties

So the next bit is how to encode the properties. Here are a few ASCII/Hex Codes you may need

Code Punctuation
%3a : (Colon)
%2e . (Period)
%23 # (Hash, Pound, etc.)
%2c , (Comma)

So if you want to search for the word ‘spacey’ in any text in a document in a search scope named fuzzy you would have a URL like: http://server/search.aspx?tp=Document&s=fuzzy&k=spacey

It gets a tad bit more complicated when you want to search only in a property not in the full text. First, you have to find the property you want in Manage Properties, and then you have to setup the search … When you add the property to the search you have to add a single character specifier indicating the type of the property before you start it’s name — mostly you’re dealing with Strings so ‘S’ is appropriate. Then you have to put commas after the property name the keyword Contains and another comma — all encoded of course. Next, once I search for a property I have to add a date specifier to the query. The title property is really urn:schemas.microsoft.com:fulltextquery.displaytitle. So if I wanted to find the same thing in only the title property I’d do this: http://server/search.aspx?tp=Document&s=fuzzy&pt=Surn%3aschemas%2emicrosoft%2ecom%3afulltextqueryinfo%3adisplaytitle%2cContains%2cSpacey&2cAnd%2c&d=All

Clear as mud right? It’s not that bad, basically describing the property and url encoding all of the special characters makes it look ugly. If it weren’t encoded it would look like this..http://server/scope.aspx?tp=Document&s=fuzzy&pt=Surn:schemas.microsoft.com:fulltextqueryinfo:displaytitle,Contains,Spacey,And,&d=All still not pretty but certainly much more readable.

I hope this helps when you want to be able to create links to property searches.

SharePoint Office Integration

This is an old link [page removed], but one I seem to need from time-to-time.  It’s the MS document that explains (compares) what various versions of office can do with SharePoint.

Why does SharePoint create a new version of a document in a document library when you edit properties?

I’m working on an article for IntranetJournal about the way that SharePoint actually uses meta data (fields) in a document library and as I was crawling through the details it occurred to me one of the reasons why SharePoint has to create a new version when you update the properties of the file.  Many people have wondered why this causes a new version to be created — including myself.  However, I believe that I’ve stumbled across the answer — Because it *IS* a new version in some cases.

In the case of Office documents, the document itself gets updated to reflect the new properties.  You can see for yourself by checking File-Properties-File Properties on the file.

It’s also storing the previous properties off if you needed to restore them, even if there is no way to see them.  (It’s not just recreating them from the properties in the document because it has the behavior of restoring the properties even for non-Office documents.)

Display a Random Item from a SharePoint List: Beta Testing

One of the annoying things for me has been trying to get a web part that would show a random item from a list.  I’ve wanted to feature projects, employees, questions/answer sets, etc. on the home page to keep it new without having to finely control what data was exposed on the home page.

I’ve completed the coding for a Random Item web part which takes a random item from a list and displays it using the formatting that the user/developer provides.  It has the ability to support previous and next buttons as well as the ability to cache the results for a period of time so that the entire page isn’t in a constant state of flux.

I’ve still got to finish the documentation and create a few example DWPs, but I’m looking for folks who are interested in beta testing the web part and letting me know what additional features it needs.

How to use SharePoint as a Mail Merge Source

I was looking for how to perform a mail merge using a SharePoint list as a source and found Wayne’s post asking the same question.  There wasn’t help there, however, amongst the comment was on from Yatin Purohit indicating that you could link to the SharePoint list as a table in Access and then use the Access table as a source for Word to use in a mail merge.  It’s a pretty useful technique — too bad there’s not an OLEDB driver for SharePoint lists. I suppose this will work for now.

Recent Posts

Public Speaking