Tuesday, March 23, 2010

Changing the default operator on the SharePoint Advanced Search

In one of my SharePoint projects, the customer asked the following question: “Can you add another operator in the property picker on Advanced Search aspx and can you change that operator into the default operator”?

Out of the Box advanced search

The out of the box Advanced Search page looks like this:

image

In the last field “Add property restrictions” you have 2 options in you default operator menu: the “Equals” and “does not equals” option. Before the Infra Structure update, you also had the options “contains” and “does not contains”. But Microsoft decided to remove this because these options can heavily decrease performance because expensive Transact-SQL queries are generated in this search scenario. For more information about this, read KB950437.

In my scenario, the customer wanted these options back and set the “contains” as the default operator.

Adding the ‘Contains’ operator

To do this simply go to the  Properties section of the Advanced Search Box configuration, click on the dialog box as seen below and then in the Properties xml on the top of the XML, change the default Value=”False”  into “True”:

     <Option Name=”AllowOpContains” Value=”True”/>

 image

After hitting the Apply button and saving this page, you get the two extra options:

image

Setting the ‘Contains’ operator as the default value

Now for the second requirement, I searched for a solution in Jquery which could be put in a hidden Content by Editor webpart. With the help of Marc D Anderson (follow him on Twitter @sympmarc) and his Jquery library for SharePoint Web Services website, I found the right code for this.

First of all, download the latest version of the jquery-1.4.2.min.js and put this in the document library that also contains the advanced.aspx. But be welcome to put in in any library of your choice. In the code underneath I make a reference to this jquery-1.4.2.min.js. BTW, always use the minified version in a production environment.

On the advanced.aspx page I have put a hidden Content editor webpart. In the source editor I put the following code, which results in setting the 'contains' operator as the default value:

<script type="text/javascript" src="jquery-1.4.2.min.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$("select[Title='Inclusion Operator'] option[Value='Contains']").attr("selected", "selected");});
</script>

This does the trick!

image

That’s a wrap

Without using heavy coding a power user can do many things on the SharePoint platform. You can extend your out of the box SharePoint with the help of using Jquery. On the internet you can find many resources with ‘ready to go’ Jquery scripts for your SharePoint platform and extend the SharePoint user experience. Be careful to test your code always in a test environment before putting it live on a production environment!

Monday, March 8, 2010

SharePoint 2010 & Office 2010 Launch may 12th

Microsoft has spread the news. The new SharePoint 2010 RTM and Office 2010 RTM will be released on may 12th. No more working on unsupported Beta 2 or RC's. Finally things will go through!

for more information, check the Microsoft SharePoint Team blog.

Tuesday, November 24, 2009

Ontwaak met e-office en SharePoint 2010 (DUTCH ONLY)

Het einde van het jaar staat vaak in het teken van goede voornemens voor het nieuwe jaar. Wat zijn uw goede voornemens op zakelijk gebied?

Wilt u uw mensen en hun kennis nu echt gaan verbinden? Bent u op zoek naar manieren om effectief klantcontact te bereiken? Of wilt u de communicatie en bereikbaarheid van uw professionals optimaliseren?

e-office neemt u graag mee op weg naar 2010. In een aantal interactieve sessies ontwaakt u in 2010 samen met e-office en zullen wij u inspireren hoe u uw voornemens waar kunt maken met de inzet van Microsoft SharePoint 2010.

In 2010 organiseert e-office de volgende ontbijtsessies:


12 januari SharePoint 2010: verbinden van mensen en kennis
2 februari SharePoint 2010: effectief klantcontact
2 maart SharePoint 2010: optimale communicatie en bereikbaarheid

Interesse?
Voor meer informatie, het programma of deelname aan de klantsessies bezoekt u onze website

Tuesday, November 3, 2009

Short Overview of SharePoint Features in Visual Studio 2010

Now that the SharePoint conference is over and everybody is all exited, I as a functional SharePoint consultant, am looking with interest to the new Visual Studio 2010 editon. I rarely use it right now in my day to day work. Looking at the new features, I know one thing.... I'm going to use VS2010! It looks very nice.

The Microsoft SharePoint team has a nice blogpost with al the features in it. Check it out! Very cool I found the integration between SharePoint designer 2010 and VS2010. I can build custom site templates and import them to VS2010 and make a feature in a solution from it.
The features I see myself working with are:
  • Feature and package Designer
  • SharePoint explorer (looks a bit like SharePoint manager 2007)

Can't wait to start!

Wednesday, September 16, 2009

New DIWUG event: September 29th

The Dutch Information Worker User Group (DIWUG) is organizing yet another interesting session. This time my collegue Ton Stegeman (MPV SharePoint) from E-office will talk about the SharePoint toolbox and Dennis Vroegop will talk about Excel Services.

For the full programm, please visit www.diwug.nl (in dutch). Please subscripe if you go there.

Wednesday, August 12, 2009

Why don't ASP.NET developers use WSS?

Lately I have been following and reading this interesting topic about why don't asp.net developers use WSS on SharePoint Dev Wiki. I'm not a developer myself but I do like the disucssions about this, being with collegues or at customers talking about these sort of issues. Jeremy Thake has started this discussion on the Dev Wiki site and now has a done a great web seminar which is available here. You can follow the whole discussion on Why don't asp.net developers use WSS here.