Quirky little things about Lists and Views

Things always come together in two ways. A blessing and a curse. Take SharePoint lists and views for example.

The blessing is that they're really powerful stuff where a user can define how they want to view the information in a list. Grouping, sorting, filtering, style. All great stuff.

Now for the curse.

Often what's displayed in a view isn't enough. Sometimes the user doesn't like the way the grouping works. The most common thing is the "Group: " tag that gets added and people want to just see the name of the group. Or maybe they want some funky javascript so that when you click on a group it expands and collapses the list (like Jim Duncan documents here). Little things that make usability a better thing.

So here's the curse I came across that you might keep in mind. It's a great thing to save a list as a template for later use. You can even write a silly little tool like I did to generate hundreds of lists across multiple sites, all using the same template. The rub is that the template isn't forgiving.

Case in point. I created a new list with various views that sliced and diced the data up so the user had a good set of links to quickly look at information in bundles rather than a big list of line items. The list was created and named ProjectSubmissions.

TIP: When you create a list, view, or column it's best to name them without spaces and rename them later for display purposes. Why? If you create a list or column with the name "My List", internally SharePoint will store it as "My_0x00_List" (or something like that, it varies with the tides of the moon). When you're trying to do something programmatically with the list you'll be tearing your hair out trying to figure out the internal name. To avoid this, just name it "MyList" (no spaces) and then after it's been created go into the settings and change the name to something more visually friendly like "My Fabulous List". You'll always refer to it in code or by url as "MyList" but it makes it easier in the long run, trust me.

Okay, so I had my list and created various views to sort/group the information. One of the fields was called "SiteType" but the user wanted a view grouped on this field but rather than seeing "SiteType: <group data>" in the grouped label, they wanted it to say "Program: <group data>" and filter the grouping so that it only showed data where SiteType = "Program" (which was a choice field). Follow me so far? Okay, easy enough. Each view is a new .aspx page that SharePoint creates for you when you build a new view so you can easily load this up into FrontPage and with a quick conversion to an XSLT view, change whatever you like. 2 minutes later the grouped view was renamed and all was well.

Now here's the killer. After a few hours of development (Creating lists and views is so damn easy with SharePoint!) we packaged it all up for remote deployment via a tool to create hundreds of these little things. At the last minute it was decided to change the name of the list from "ProjectSubmissions" to "SiteCatalog". No problem. That's easy enough right? It was and everything seemed to work. Zoom, zip, off goes the deployment to the various sites and everything works. Until someone clicks on the one customized view when then points back to the originally named list! ARGH! For whatever reason, the internal name that was originally created in the list was saved when the view was unghosted to do that simple little edit. All the other views, even though they were generated .aspx pages worked fine. The one unghosted page though was static and thus pointed back to the originally named list "ProjectSubmissions" which now was called "SiteCatalog". Boom, 404 is your result.

Anyways, be careful with your templates. They remember everything and don't care if you didn't.

Other things that irk me (and are fast elevating themselves to becoming a peeve) is the fact I can't group on a calculated field. Or that I can't filter lookup fields. And why can't I export/save the contents of a list created using the Issue template like I can with every other list? And the list goes one.

Okay, enough ranting. Hopefully Microsquishy will listen to the cries of us stonecutters and make life better in a future version of service pack. Until then, we do what we can with what's there, twiddling and changing things hoping we're not shooting ourselves in the foot while we do it.

1 Comment

  • Arrg. Spammers.



    The column's internal name can be a pretty annoying problem if you're using a localized version of WSS. Hebrew is represented like this '0x74_0x00_0x23...' and such, something ugly like that.

    So what we do is ineed create everything in English, and then rename.

Comments have been disabled for this content.