This project has moved and is read-only. For the latest updates, please go here.

2 related projects: Static Filters and ListMerge (a.k.a. Join)

Dec 20, 2012 at 4:21 PM

I have created 2 projects (on GitHub) that may be of interest to the folks here. They both have come out of requirements for a SharePoint site that I am working on.

1) Static Filters ans Sorting

This one is rather simple. It requires jquery.cookie ( extension but does not need SPServices. What this extension does is retain filters and sorting between page loads / sessions.

Say for example you choose to filter column 'a' by 'userx', that filter will be re-applied when the page is reloaded at a later time. You can clear the filter and it won't be re-loaded.

Same applies for sorting with the exception that it currently is not possible to stop the sorting (short of killing the cookies). I will be looking (in the new year) to trap the pop-up menu and add a 'Clear Sort' item.

2) List 'Merge': Get multiple lists with joins.

This one is much more complicated. It uses SPServices. It is essentially implementing a 'query' structure to the 'GetListItems' method. It also expands on the mappings structure for SPXmlToJson (which it uses).

The output of this function is a JSON object that contains the requested data.

It has not yet been fully tested (have not tested complex 'where's and nested joins). It runs completely in JavaScript.

These were born out of the need to keep the site editable by anyone (I don't have access to VisualStudio and neither will the maintainers)

Both projects were developed using Sharepoint 2010, jQuery 1.8.2 and SPServices 0.7.2.

Feedback is welcome. I know the documentation needs work - it's on the to do list.