Archive

Posts Tagged ‘SharePoint’

Reordering/Ranking SharePoint List Items

August 6, 2010 22 comments

SharePoint link list has a feature which lets you Re-Order list items and this is done using List Actions.

image

This in turn uses ReOrder.aspx page to reorder list items. Here is a summary how this functionality it implemented.

  • Links list contains a field called “Order” which is an internal field and default view is sorted by it.
  • Reorder.aspx uses this Order field to update and reorder list items in that view.
  • Default view is sorted by Order field and reflects the new order.

Now code that runs in Reorder page doesn’t really care about most list types and location since it uses list GUID to modify the order and the Order field is part of each and every list template but for some reason SharePoint has blocked this feature from all the other list templates, like most other things. But given the list GUID Reorder page is able to sort list items. So why doesn’t it work ?  Because Order field being an Internal field is also hidden from other list templates, so while it is possible to reorder we are unable to create a view which will use this order to sort list items.

There are tons of posts around this method and dropping in data view web part to sort list items and solutions which implement their own ordering feature. I prefer a much simpler approach (according to me at least) . Unhide the damn order field and create a view.

I have created a feature which does exactly that.

“List Order”  is feature which enables list re ordering for your custom list. The feature is enabled on “Web” level and enables this action item for all the lists for that particular site. The feature has 2 parts to it:

1. Custom List Action item:  This provides the action item to link to list –reorder page.

image

2. “By Order” View:  When feature is activated, it creates a view on the supported list called “By Order” which is sorted by the “Order” field. (Note: This is only applies to existing lists and wont reflect on  newly created list. however you can create your own views and select the sort by “order” field)

image

Now the feature once activates will provide the Action Item and View to all the supported list types for that particular site. I haven’t tested this feature with huge list or many other scenarios, but I assume it would work similarly to a link list and I don’t see a use case for manually reordering lists with more than 50 items in it.

Screenshots:

1. Reorder Action item on custom list:

image

2. “By Order” view before reordering of list items

image

3. Reorder page

image

4. “Order By” view after refresh

image

Note: It is currently configured to work with following list templates:

  1. Generic List
  2. Contacts List
  3. Task List
  4. Gantt List

You can change them if you like from the source code.

Downloads:

Feature WSP Download
Source code Download

Adding SharePoint Search plug-in for Firefox

June 16, 2009 4 comments

If you use Firefox search plugin and want to add your SharePoint intranet as part of the Firefox Search drop down, follow the steps below

First the screen shots of what we trying to accomplish

image

image

image

1. first create a blank xml file

2. Copy the text below and replace “sharepointurl.com” with your sharepoint url

 <searchplugin xmlns="http://www.mozilla.org/2006/browser/search/"><shortname>Sharepoint</shortname> <description>Search Internal Site.</description> <inputencoding>utf-8</inputencoding> <img height="16" width="16" />data:image/x-icon;base64,R0lGODlhMAAwAPcAANHORjF5xrtGJ5qWJtxlIyRZqhdYs8hGF8rZvXNxK7u0FChTmmfLZnPcc8jU6oHsgeHdM3zrfOiFRLfH5Cpzw8G7FXGZOeN6N6g5Jf39/ae73XDjcPH1+mvha9fbzB1SpY2LTvmZQ+vHwlrVWpPykozxjBthudVoNujmQ9NYHry6m2e6XvL48eXiKqmjL9iTiszlx9deIiNtwWTdZbi9pDlpsunmNdvs1xREmcnDLLbZrt2hmeqCOMhVJ9jUNNLNGFWqS0BttRRJpbxGN8vFFXzSdzZyvZrzmVPCU/ujT+3162KHMYnsiDVmq1WgOtnUHOC4r0ytSyVOlZWTNOby47WtGLm1OsVMIpXrk1yzTcpcMTp/yvKKN+l6LagoFvLc2WraaralS2eoNSJpvpyy2VzEW0SDyuTq9feTPKa1yOXCu/v089XQGU2LzomGK3G1Y/OZUvXk4thzQZ74nVCxT5a1KcvFG/37+ud2KeBsJbEqF6CcLE68Trg7KwY9oL7dt6T6o6wbCLs1E9jh8E6jQ6qiHmXVZSBhtvn6/dzZGyxmtkylSj95wMXgvriyK7U8H1a/VZ0zKff59czJO1/LXt7bKeNwJitaoK7VpYPbgNHMJ4mj0q+sI1i3VtnUJESIzYPvg3jJbV/YYFTOVZiv2HTndHzhe4PjglmuUc7IFqmnPaovHNPozq9BJ81QHNbSKcM9FB9lvPnu7SlfrN7aH8bAFFezVTBuvM/JHI/1jvCEL+/z+e7Py5b3lbDC4bA1HqIxIrcwE06jO/b4/DJfsMBRQuHdRa4gDfz8+r09GOrp3gxBoN5vMIecaI6jaq2cRcS9IHnpeDpjiVBpe+yPT/GPRGC3W8pkPPL195wyEJDki3DPb7zBnvj793+FZfv9+mvDX7pNLo3ih+1+LO/T0B1IiMPAQTZfizJdoEy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HhKEag8wwVnnoGGNEJBmOF0hRZmeIk0d8FGRC1iYLF1LvCA8oAp21j/YwFhnrlywDwYJF3QMup8kqMMOiqCzjL6sJHK3BUIozXeekewQd/CXGBJcIIvaDhBfkyY4xg7znKJH6/UXEsFlQPCNSgmRrMBA9Z0XvQBByST3ugDle4l4zseojrruFCugDBb533ipAx0IgwzoB8AiyC/ABPInwX50eWXhB5Cph+a2PG6AsvPkUvtTYJBiS3TC2d9nqtoLwuN3StuaixhjrkA+depAPrYVCImbYBS8DtBCqx3vWDULxBf0Er+AgAmE5jAAOPTD/qqUAUCPq8DHRBFGeggDC0MJxl50sMDeREH7gnEDziSQZguiMH/fQhEhSiEMEjABAN2YAYiJKEW/wTwiEf8YhX1i0QgWOjCf8AwAGOwIA1V5QcX7GEPRBrADh9gux+KYgRIICGM1AMMYERCiWqIA/6CZwZTWdAAcKSiR+aYAGEoaVIzACIYoyCMQPjxj4CEQhwM4odShQmOcZSCH+rRDxXQQAUqEEYPD6jHUSCBj2qAgho2KYJOelIWhJTHLWKByFRRER/5oIEqaSDJaHhxBCOwJB+5oQJNepIX5PiCLFyYgWH4gRG3OAQiP0BMRaahHR7wAAIQIIxTNAAMXxyFJfnAx0Z4wB+yWIM2tdnEfyCCA34IQhNmUQBiErNdfvCFA7BxhxuwQhhFYAAlyoCEevJhW8JgxQ260cOQYZzBD01AB7satqr/qZMD/6DCO1dgDVvQgQ5RiOgiFiEMGLCCBQ3ZxSBQw9GOclQDDhjGP5QAA9yY9KQm/QMMMMqQXTjAFxrQABlmSoqakoIMGpjAGWjEAhg04g+N0AEmMKEDoRIVE3+4gVMYgogzDMIBE4iqL6Ya1Qk4YBAi/UcGbtCIRvj0D0DtqldhcAMlrHEhGUDEMHaxCw6wlQPDGIZbEUEQSVDhrndVgl6VwAJJdKMbZ82IYAdL2MIa9rAECQgAOw==</img> <url template="http://sharepointurl.com/searchcenter/Pages/Results.aspx" method="GET" type="text/html">
<param value="{searchTerms}" name="k" /></url><searchform>http://sharepointUrl.com/searchcenter/</searchform> </searchplugin>

3. Save it under [Firefox install dir]\searchplugins\  as sharepoint.xml  usually “C:\Program Files\Mozilla Firefox\searchplugins”

4. Restart firefox

To use with with People search replace url with /SearchCenter/Pages/peopleresults.aspx

For IE you can use this site for custom search plugins http://www.microsoft.com/windows/ie/searchguide/en-en/default.mspx

Is Null Filter Condition for List Views

April 2, 2009 5 comments

I have always wondered why SharePoint List Views don’t have filters for  Is Null and Is Not Null when CAML Queries support it.

U2U CAML Creator

image

List View

image

Turns out it does. When you select “is equal to” and “is not equal to” and do not enter any text it generates “IS Null” and “Is Not Null” CAML Queries for the View.

 

image

Result into this

image

 

Tools used:

U2U CAML Builder

STRAMIT CAML Viewer

Rohan

Categories: CAML, List, SharePoint Tags: , ,

One Note Web View and SharePoint Integration

March 5, 2009 4 comments

One Note:

"Office OneNote 2007 is a digital notebook that provides people one place to gather their notes and information, powerful search to find what they are looking for quickly, and easy-to-use shared notebooks so that they can manage information overload and work together more effectively." –from Microsoft

More on One Note click links below

http://office.microsoft.com/en-us/onenote/HA101686341033.aspx

Webcasts: http://office.microsoft.com/en-us/webcasts/HA102547531033.aspx

Out of the box the One Note does export to different formats but not as a good Web/HTML interface. You need a free plug-in on Microsoft’s codeplex site called One Note Web Exporter to do that.

Download Link: http://www.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=ONWebber&DownloadId=15337

Steps to export One Note file into HTML format and display on a SharePoint Page using Page Viewer Web Part.
  1. Installation

· Download the plug-in from http://www.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=ONWebber&DownloadId=15337

· Run the set up.

· Make sure all instances of One Note are closed.

· Open One Note (existing file)

  1. Exporting as Html
    1. Once the plug-in is installed and icon should appear on the toolbar section for the plug-in image
    2. Click on the Icon to export
      1. 1. Select a notebook to export

        clip_image002

        2. Set Export Location

        clip_image004

        3. Click Preview ( Or Open the Html Page from location you saved using IE)

        clip_image006

3. In Step ii above you can even create a daily schedule to export it.

  1. SharePoint Integration:

Out Of the Box you can save One Note files into document library to share it across team members but this requires One Note application to be installed on each user’s computer. To display One Note file within SharePoint as a web page follow the steps below. In Step ii above instead of saving file into local folder, publish it to document library.

    Publish to Document Library

1. Create a Document Library ("One Note")

2. Copy URL and Paste to Screen Export to Web Screen.

image

(Click "Save As" enter the document library URL e.g. http://sharepoint.com/sharepoint/OneNote/ and then enter a filename "Test")

3. Click Export and copy the File URL (e.g. http://sharepoint.com/sharepoint/OneNote/Test.htm )

4. Go to SharePoint Site use existing Page or create a new "Web Part Page " to display One Note Section.( In this example I am using a Blank Web Part Page )

Display One Note Web View on SharePoint Page

1. Click Site Actions à Edit Pageà Add a Web Part

2. Add Page Viewer Web Part under Miscellaneous Section

image

3. Click on "open the tool pane" to modify Page Viewer Web Part properties.

1. Click on "open the tool pane" to modify Page Viewer Web Part properties.

Paste the file URL which has been exported to document library in Step C and Paste it in "Link" property text box and under appearance enter a proportionate height for the Web Part check screen shot below for highlighted properties.

image

This will display the One Notebook within SharePoint Page.

image

-Rohan