SharePoint 2010 Programmatically Create List from Custom List Template in C#

Yep - tech 2010! Continuing my tour of strange facets of old SharePoint technology, here’s something new I tried to do today that took a lot more effort than it should.

The objective was simple: create a new list, based on an existing list.

This is reasonably easy to do using List Templates… when you know how of course.

So the steps are:

  1. Save a copy of your current list as a template
  2. Create a new list based on that template.

The main issue is the way SP stores the custom list template when you’ve created it.

Read more

Subaru Forester window motor replacement

A quick video showing that it’s possible to replace an electric window motor on a Subaru Forester (in my case a 2003 Subaru Forester XT SG Turbo ABC Etc. without totally taking the whole car apart. Who knew?!

(Well no-one, apparently, hence why I made the video. Duh.)

Full schematic of the window mechanism available here.

Read more

Sample Python code to query Wunderlist API

Update: Wunderlist is no more - it got acquired by Microsoft :( The domain is also broken but I’ll leave the code here for funzies.

So I’ve been working on a simple application at home, part of which I want a list of items, which I want to be able to control from Wunderlist. As a relative novice to Python, I was looking around for some pre-built library that I could just plug in to my existing code. A few things do exist - there’s some sample code at Github and there’s even a basic API wrapper called wunderpy2.

Read more

Surf Snowdonia - 10 things about a trip there

You’re unlikely to be reading this is if you haven’t heard of Surf Snowdonia. But if you haven’t - it’s the world’s first commercial inland wave adventure parc. Or in other words, it’s a surfable wave in a lagoon nowhere near the sea. The park opened in 2015 to much fanfare but closed again after less than a season due to mechanical issues. But over the winter it’s had some investment (£1m if you believe what you read) and it’s open again.

To surf there, you have four options… IE where in the lagoon you can surf. Beginner, improver, intermediate or advanced. The website has a description of what you can expect from each and the sort of skills you should have. It’s advisable to book ahead. Not really knowing what to expect, I booked an hour on the intermediate wave which included board rental.

The wave itself is relatively simple in concept - it’s an oval shaped lagoon with a structure in the middle. Every 90 seconds an arm dredges from one end to the other creating a wave in its wake… Well, in front of it. Not in its wake. That’d be behind.

Anyway. Each of the four sections should give something to all abilities. There is plenty of white water for beginners to play in with the advanced take off points should give experienced surfers something challenging. I’ve been surfing 20 odd years - on and off - I’ve surfed some great waves around the world but I am by no means an expert. My quiver consists mostly of longer boards 6'7″ upwards but most importantly, whilst my surf fitness is quite high, I’ve not actually surfed in a while (young family has rather got in the way!) so felt that an hour on the intermediate wave would be a good starting point.

So here are my 10 key thoughts and observations about Surf Snowdonia

Read more

HTML5 input number and search

Hurrah! Long gone are the days of frantically worrying whether or not your flashy new website is going to display nicely in IE5 and Netscape (‘Nutscrape’ Lolz) and the heady days of Firefox (you know, before it became total bloatware.) HTML5, CSS3.0, frameworks like Bootstrap and even - would you believe it - some form of agreement amongst the browser manufacturers on what should work irrespective of what you’re viewing it in means that a lot of the old challenges are gone.

Read more

SQL Database login for x on x failed. Login failed for x. Event ID: 3351

Below follows some notes on an issue I recently encountered and spent best part of a day troubleshooting. This was occurring in a small SharePoint environment but I suspect it could occur in any environment which has some sort of distributed call to a SQL Server.

TL;DR - it was the Dell KACE Agent. See the end of the article for more.

In this case though, there was a SharePoint application server, and a SharePoint WFE that every half hour was showing an error in their event logs with EventID 3351. I noticed the errors were staggered - i.e. one server was at 15 and 45 minutes past the hour and the other was at approx 20 and 50 minutes past the hour.

Read more

This functionality is unavailable for fields not associated with a list

Ah, the danger of the Internet. I hit this problem - trying to update a field built-in to a content type (the Title field) so that it was hidden from the UI. Easy I thought, get the SPWeb, get the SPContentType, find the field (ct.Fields[“Title”]), set it to hidden and update it. Nope.

Exception: This functionality is unavailable for fields not associated with a list

Engaging my brain / memory resolved this, but not before I encountered numerous “helpful” posts on the web about how what I was trying to do was not possible. One such example here, which categorically stated…

Read more

SharePoint Features + Renaming

This is a fun one. In some of our Visual Studio solutions we use the period character - “.” - for project naming which broadly reflects the namespaces in use.

However, this causes issues for Visual Studio namely in the ability to rename features. So when you create a feature, it will adopt a default name of Feature1 and it’s not possible to rename it directly from within the solution.

Fortunately, there’s a nifty workaround that does appear to work, without having to redo your solution/project structure and naming convention. Found via this post:

Read more

Sharepoint 2010 + Internal Field Name Max Length

Little reminder about something that has just kept me busy for the last hour or so - internal field names in SharePoint lists have a max length of 32 characters. SharePoint treats this a little bizarrely - it will create the column but then truncate the internal field name. Thus is you’re doing this programmatically - and then depending on the column existing with that particular field name, things will fall over. You’ll probably see an error like

Read more

Battery change on a Brita Elemaris water jug filter

I own the Brita Elemaris water jug. Very happy with it as it’s slimline and fits neatly in the fridge. Could be a bit bigger, but hey, couldn’t most things.

The mini LCD readout on the top is pretty useful for knowing when to change the filter. I actually run it through twice, but nevertheless it’s good to know when it’s time to change. The readout is supposed to last 5 years and is not user serviceable. Well, I’m sad to report that it won’t last 5 years but fortunately it is is user serviceable. I’m sure they only tell you it’s not serviceable to get you to buy a new one, and although the jug is pretty cheap nowadays, I didn’t feel like splashing out £15 to replace a £2 battery.

Read more