More SharePoint shenanigans

This content is 12 years old. I don't routinely update old blog posts as they are only intended to represent a view at a particular point in time. Please be warned that the information here may be out of date.

This week, I’ave mostly been working in SharePoint (those of a certain age may spot the reference to Jesse from the Fast Show?)

Earlier this month, I wrote a post with a few hints and tips I’d picked up whilst developing a site based on SharePoint.  Since then, I’ve come up against a few more barriers…

Item level permissions on document libraries

SharePoint allows administrators to set permissions on lists so that users can read and/or edit only their own items. Unfortunately, whilst that functionality is exposed in the user interface for lists, it’s not for document libraries (although it is in the object model). Basically, if you can write some code, you might be able to set the requisite permissions, but that’s beyond my abilities.  Thankfully, others have done the legwork, either in the form of a rough-and-ready utility like Matt Morse’s or Tim Larson’s Read/Write Security solution.  Either way I need to get the the changes applied to our SharePoint farm… which may well be more trouble than it’s worth…

Changing the contact for a page

Even though there is a page contact in the properties for each page (at least there is in my company – that might just be metadata that we use…), changing that property doesn’t seem to affect the page contact (which our templates show at the bottom of the page – and is also shown in a view of all pages).  The answer is to edit the page settings (in the same way as to change the page layout). Thanks to Ian Mitchell (@ianmitchell2) for setting me on the right path there…

A calculated column, with a formula based on a Yes/No field

I wanted to display a tick or a cross instead of a yes or a no in a view on one of my lists and, in order to do this I needed to create a calculated column that produced the necessary HTML (and a script to display it…). I’ll write another post about the fancy formatting but I really struggled to work out how the Yes/No is recorded (Yes/No; 1/0; TRUE/FALSE?). Exporting my list to Excel proved that SharePoint stores boolean values as TRUE/FALSE (confirmed by Peter Allen) but the trick is to leave out any quotes – if you look for =IF(Column="TRUE","This","That") it will always be negative and the outcome will be “That”.  The correct formula is =IF(Column=TRUE,"This","That").

Editing in data sheet view but the view is read-only?

I needed to perform some bulk updates on lists in SharePoint but, frustratingly, the view was marked as Read Only so I couldn’t make any edits.  I couldn’t see why this was, but googling turned up an explanation – the list was set to require content approval.  PointBeyond has more information on configuring approval in SharePoint but temporarily removing this setting allowed me to make the necessary updates, before re-enabling it.

Connecting data in web parts

Back in around 2003/2004, I remember attending a SharePoint training course where I connected a couple of webparts to work together.  For someone like myself with little or no coding skills, this was magical… and then I forgot how to do it.  Yesterday, I ran up against an issue where, partly as a result of some database design decisions by the previous  designer, I found myself unable to display the view on a list that I wanted to, as there was an implied hierarchy in the data, but the lower levels in the hierarchy link to their parent, rather than parents linking to children (it would be better still if things could work both ways…).

The workaround, albeit clunky, was to configure two webparts, each showing a view on a different list, before configuring a data connection so that the first list provided a row upon which to filter the second list.  I needed to be careful in selecting columns (i.e. the second list needs to have a column that is a lookup on the first) but, with that in place, I was able to at least show the relationships between the items in each list.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.