Display a List Web Part View Using a Query String Parameter

So what if you want to have a single “dashboard” page that displays a number of web parts, including a list web part? You’d like to provide multiple links to the page which will display slightly different views of the information. In this case, you may want to think about using the view query string parameter in your links to change the view of the list web part displayed.

To get a list view GUID/s add the list web part to your page and filter the list. You can then look at the URL to find the GUID, e.g. https://server/sites/subsite/Shared%20Documents/Dashboard.aspx?View={CEF00598-91B2-456E-8068-F351BC9CC1BA}

Change the web part View property to access different view GUIDs. Once you have a GUID for each view, you can add the ? or & View={GUID} to your dashboard hyperlinks.

Click the hyperlinks and bingo-bango, you should see your list web part displays the relevant view. This should not effect any other web parts also on the page, as the view GUID is unique to the specific list.

 

Grouping a List View by a Calculated Date Field

If you’ve been ultra efficient and create a calculated Date Field that will display the month and year (e.g. Aug 2015) of a date column so that you can group something like News Articles in this way, you may have already discovered that grouping your list view using this new column displays the group header as blank. When you include the calculated field in your view, you see it has value BUT the won’t display in the group header.

I found a work around for this – simply edit your view and change the style to Basic Table. I also played around with default expansion of the groupings. This should now display your calc field group headings and display any items underneath.

Where can I activate web application features?

In SharePoint 2010 and 2013, it is a bit tricky to find the list of features to activate or deactivate so I thought I’d leave some breadcrumbs here for folks to follow:

SharePoint 2010/2013:
In Central Admin click Application Management > Manage Web Application then click the relevant Web Application name to highlight it. Finally, in the ribbon, click Manage features.
SharePoint 2007:
In Central Admin click Application Management > Manage Web application features
If you can’t find the feature you are looking for in these lists, you have either:
Not installed the feature
Installed a feature scoped at a different level (i.e. not web application scope).
Happy Activations!

Show All Document Versions

Thanks Stefan for your awesome post here (I’m a bit slow on the uptake but better late than never). I have used the ?IncludeVersions=TRUE to show all updates to InfoPath forms in a forms library. This seems to give users some sense of security (they don’t really believe versions are being tracked until they can SEE them).

You can also add multiple lists to one list view page and apply the filter. It will show the versions for all lists on the page. Good for a “versions” page rather then expecting users to find use the Version History menu option. Check out Stefan’s post to see how you can also use other filters with the versions query string parameter. Very very cool and super easy.

Display All Appending Field Entries in a Single List View

Saving a list  template with content and then creating a list using that template doesn’t bring across append field history. This is to be expected really but it’s a pain if you are trying to migrate the content to a new site collection. I found a cool way to get around this though; which requires manually copying the append history into the destination list’s datasheet view. To be able to do this, you first need a way of displaying all the appended comments together (viewing append fields in the item display form or library views only show the latest entry). Below I will describe how to do this. I’m sure there are other good reasons to display all append entries in one view but here I will outline the steps to migrate the content:

1.     Add your newly created list (from template with content) to a blank web part page (as a list web part). Make sure the current view is displaying the append field and any others you are interested in.

2.     Export the list web part file by following the instructions in this post (who wrote this? It is friggin awesome!)

3.     Edit the file and you will see the XSLLink property points to the main.xsl file. Download this file and rename to main_showappend.xsl

4.     Edit main_showappend.xsl and take note of the import of fldtypes.xsl. Download this file and rename to fldtypes_showappend.xsl

5.     Upload both fldtypes_showappend.xsl and main_showappend.xsl to a library in your SharePoint site and then Edit main_showappend.xsl to update the import ref to point to your   fldtypes_showappend.xsl

6.     Now edit fldtypes_showappend.xsl and find the FieldRef_Note_body template. Update as below:

<xsl:template name=”FieldRef_Note_body” ddwrt:dvt_mode=”body” match=”FieldRef” mode=”Note_body”>

<xsl:param name=”thisNode” select=”.”/>

<div dir=”{@Direction}”>

<SharePoint:AppendOnlyHistory FieldName=”MyAppendField” runat=”server” ControlMode=”Display” ItemId=”{$thisNode/@ID}”/>

</div>

</xsl:template>

7.     So now you have 3 filesmain_showappend.xsl is in SharePoint and imports fldtypes_showappend.xsl from your SharePoint library. Your list web part file is open on your desktop. Update this file to point the XSLLink value to  the URL of main_showappend.xsl in SharePoint. Save the file.

8.     Now return to your web part page in SharePoint. Delete the current list web part and import your custom web part file. Voila! Now you should see your list displaying the append field entries all together.

AppendFields

9.     Now you can “page scrape” this page to copy the append field values- organize in an excel spreadsheet if you need to, and then paste into the new list datasheet view. I actually turned off append while I did this and then turned it back on afterwards. This gives all your historic entries in one entry and then allows you to continue to append single comments going forward.

Hope this was helpful.

e

Can’t find Per-location view setting?

This is because you need to activate the site feature:  Metadata Navigation and Filtering.  This feature is a Site feature but it is already activated on Site Collection level sites. You will need to activate the feature on blank and team site templates (subsites). Activate the feature and you will see the Per-location views setting in the site library settings.

I am not going to explain what per-location views are here, there are plenty of good blogs describing the feature. I will give you a breif example of how they could be used though- Consider a Contracts library that has one level of folders- one for each contract. These folders have the high level properties you would expect of a contract – Contract Name, Number, Owner, maybe a Supplier.. Now inside these contact folders there are a whole bunch of documents that “inherit” some of the contract folder properties (I use the word inherit carefully because properties do not propagate to child documents OOTB but you can set folder level defaults which help with picking up the values of the parent folder- this is a whole other story). These contract document also have many more properties that are relevant just to the documents e.g. Document Type, Topic, Related Discipline, etc. Per-location views can be used in this case to display a default view at the library level i.e. for the first level of folders, to display the contract folder level properties. Views can then be created for the document levels and set on the folders so a document property focus view is displayed within folders. It basically just stops you from needing to display 10+ columns in you default view even if many of the columns don’t apply to all levels (like in this provided example). Gee, I hope that made sense.

Removing Recently Modified Pages section on Quick Launch

It is a pain when you create a new wiki page and you just want it to look like the default page, but it doesn’t because its got this Recently Modified section on the top of the Quick Launch. Here is how you get rid of that eyesaw:

Add a CEWP to the page and switch to the HTML/source view of the web part

Paste in this style override:

<style>

.s4-recentchanges {

DISPLAY:none; }

</style>

Save the page and navigate away, then back to see the section gone.

Reordering Links in a List

One small feature I found quite cool in 2010 was on the Links list. The order of links in a links list is generally just the order you add them in. You can create views to sort and filter the items but if you want to just swap a few items around in no particular order you can click the list or list web part, select the Items tab and then click Change Item Order. 

change order

 Its much like reordering columns in a list view. Choose you order and away you go.

List and Library Permissions Visibility

With SharePoint allowing security to be managed all the way down to the item/document level, it can easily become quite a mystery to users- just who has access to what exactly? The best way to avoid this confusion is to avoid item level security and only break permission inheritance at the libray level when really necessary. Below is a neat little way (I think) to show users who has access to the library they are currently working within, just in case they want to think twice about sharing.

Create a new document library view called Library Permissions. Open the new view and edit the view page. Minimise the document library web part and above it either add a CEWP to describe the level of access and add links to the relevant groups OR a Site User web part configured to show the Contributors group on the library. This view is a quick and easy way  for users to access this security information but be aware that the library tabs will not function on this view page (unless the user clicks the minimised library web part). The view breacrumbs can be used to navigate back to the library. There is a small maintenance overhead as well. If extra groups are added to the library permissions then this view would need to be updated to reflect this. The best thing about linking to the Contributor group though is that the members will likely change but not the group itself.

Alternatively you can add a description and link in the list/library descritpion field (settings). This isn’t quite as pretty as links in the description field can not be entered as HTML so the link is displayed in full.

I have implemented some sites with “security folders” because of the need for fine-grained permissions. In thoses cases I have created a custom folder content type : Secure Folder and added a mandatory people/groups field. This can then at least be displayed against the folder in all views. Again, there is a maintenece overhead here but it worth it if you are breaking permissions at that level.

Using a CQWP to display tasks assigned to me and my groups

The other day I came across a great lil post that described how to export the User Tasks web part and add a tag to to the properties so it would return tasks from anywhere in the site collection- not just the current site. That is pretty neat and certainly handy BUT it would be even cooler if the dang web part displayed tasks that were not only assigned to you but also to your groups. Why wouldn’t I be interested in my group tasks for cripes sake?

So I got to playing around with the CQWP and have finally cracked it. With the help of some other bloggers, I put all the pieces together and came up with the property value you want to paste into your exported CQWP to acheieve this goal. So here it is: 

QueryOverride Tag
QueryOverride Tag
Find the QueryOverride tag and delete it, then paste in this guy above. Save and then import the web part. Some folks reported an issue where the web part was not displaying when NOT in edit mode and the trick to sort that one out, is finding the  UseCache property and set it to False.

Hope that all works for you!