Unknown's avatar

Posts by Simon Doy

I am an avid SharePoint enthusiast who works as an Independent SharePoint Consultant based in Leeds, United Kingdom. I am one of the organisers of the Yorkshire SharePoint User Group in the United Kingdom. I have been designing and building SharePoint solutions since 2006.

Why do I see two copies of my Custom List Instance in a SharePoint Site?


Introduction

 

Over my years in SharePoint development I have had the following issue occur.a couple of times.

Actually back in July 2010, I posted a blog entry which solved a problem with the Manage Content and Structure page which was related to duplicate lists in a site.

  • I create a custom List with a customised List Definition which uses a schema.xml to define the List Template
  • I create a Feature which uses the customised List Definition to create a new List Template with the <ListTemplate> feature element.
  • I configure the feature to create an Instance of the list using the <ListInstance> feature Xml element,
  • Activate the feature in a SharePoint Web, click Site Actions->View All Site Content.
  • Two instances of the list appear in the View All Content page, both reference the same SharePoint list.
    Figure below shows an example of two duplicate lists in the web.
    duplicatelistitemsinweb

 

I have then always wondered what causes this?

What is interesting is that one link points to one view and the other link points to a different view, this hint was the lead to help solve the issue.

 

Solution

 

I started the investigation by digging into the SharePoint databases now quick warning, “you should not read or edit the database, doing so will leave your SharePoint installation unsupported by Microsoft!”

However, I was very careful and did not make any changes to the database.

It was one of the tables that lead me to working out why I was having these duplicate links. This table was the BuildDependencies table. I performed a

SELECT TOP 1000 [SiteId]
      ,[DirName]
      ,[LeafName]
      ,[TargetDirName]
      ,[TargetLeafName]
      ,[DirectDependency]
      ,[DeleteTransactionId]
  FROM [BuildDependencies]
  Where [DirName] LIKE ‘sites/sitename%’

Looking through the results I could see that the list had two views one called ‘ByFeatures.asppx and the other ‘AllItems.aspx’

This was correct my List Schema had defined these two views and then it dawned on me, what if SharePoint is looking at the schema.xml to work out which list page to display in the View All Content page.

So I went into my schema.xml and low and behold there was an attribute on the <View> element called DefaultView. Now both the AllItems.aspx and ByFeatures.aspx had this set to TRUE.

listschema-defaultview

 

Eureka!

So to fix this I followed this process:-

  • Updated the schema.xml <View/> element for the AllItems.aspx view
  • Modified the DefaultView attribute and set it to FALSE
  • Redeployed the solution
  • Perform an IISRESET
  • Deactivate the Feature
  • Delete the list
  • Activate the Feature to create the list

Now I only see one instance of the list in the View All Content page.

However, there is a problem with this approach and that is you lose the data in the list!

 

To Fix Existing Lists with No data loss

So we need a way to fix the lists that have already been created, seeing as the existing lists are not fixed by the schema changes then these properties must have been copied into the content database.

So to fix existing lists do the following:-

  • Browse to the list and open up the List Settings page using the Ribbon
  • Create a new View call it what you want, make sure you set it to default
  • This will reset the Default View attribute on the other views and make the new view the default view.
  • Modify the view that should really be the default view and tick the make default view checkbox. (This doesnt appear if you have multiple views with the default view set).
  • Update the view
  • Delete any views that are not needed

You should now see only one list instance in the View All Site Content page!

My experiences when migrating from iPhone 5 to Nokia Lumia 920 (Windows 8 Phone)


 

Introduction

I have had an iPhone for the past 4 years and have watched as various Microsoft phones have been released over the years.

I have toyed with the idea of moving to a Windows Phone but it’s not been a serious thought. The main reason being that I have had an iPhone for 4 years and invested a lot of time and money in the platform and bought various apps. However that all changed in December when a couple of events happened:-

1. I was given the opportunity to try out a Nokia Lumia 920 Windows 8 Phone.

2. I lost my iPhone 5 in the back of a taxi

The Lumia had arrived a few days before my unfortunate accident. However, fortunately I had actually transferred all my contacts from my iPhone via Bluetooth using the Windows 8 Phone “Transfer My Data” app.

However once I had lost my iPhone this presented a perfect opportunity to actually give the Nokia Lumia a proper try out.

The following sections explain my thoughts and experiences as I moved from iPhone to Nokia.

 

Sim Card Swap

The first step is to move your phone calls and number over to the Nokia. The iPhone 5 uses a NanoSIM which is a little smaller than the Nokia Lumia’s MicroSIM. Therefore I need to swap the my mobile phone number from the NanoSIM to a new MicroSIM.

I am with O2 and normally this is a pretty straightforward process which I have used a few times. O2 provide a automated website based service, called Swap My Sim. With this service  you put in the details of your mobile phone number and a code is sent to your phone. Once you get the code, you enter that into the website and fill in the SIM serial number. Your mobile phone number is then moved over to the new SIM. This SIM swap process however requires that you have access to your mobile.

Therefore I had to go to the O2 shop, I took the Nokia Lumia with some ID. After a quick conversation, I was taken through the security process and a new SIM card was setup. The process to transfer the SIM was pretty quick for voice. I waited about 5 minutes and rebooted the phone and it picked up the O2 network.

However the process to pick up data was a little more complicated. The SIM swap process can take up to an hour for voice and 24 hours for data, this has never been the case when I have used it, its normally been pretty rapid.

After about an hour, I received a text from O2 saying that I need to phone customer services to get the phone configured for MMS and WAP. So I called up O2, they explained that I need to be moved over to another profile and off the iPhone package. I would keep my plan of unlimited minutes, texts and 1 Gb of data.

Anyway after a day I still wasn’t getting data. So I ended up having a look at the settings for the Windows Phone. Amazingly I found the answer within the Settings App.

If you scroll to the bottom there is an Access Point setting, this has a number of profiles available, one of them being the O2 Monthly access point profile. I chose this setting and I could see that the data connection started to kick in.

 

Transfer your contacts

The Transfer My Data app was very easy to use and required Bluetooth to be switched on both phones. The Nokia Lumia was connected to the iPhone and the application started. You have a number of choices of the type of data to migrate.

I chose to transfer my contacts and the 1700 contacts took about 10 minutes to transfer the data between the two phones.

 

Transfer your music/photos and podcasts

Microsoft provide an application for your desktop called the Windows Phone 8 Application. This is currently in beta and is a great tool to get the rest of your data that was backed up by iTunes for you iPhone.

The application interrogates iTunes and allows you to sync the iTunes content which includes, music, photos and podcasts out of ITunes on to the Nokia phone.

 

Transfer your e-Mail / Calendars

I use Office 365 which is effectively a hosted Microsoft Exchange account that is managed by Microsoft. The process to setup my email and calendars was pretty straightforward. I used the Windows Phone Mail app and added my email address and password, all the settings were brought across and my calendar was setup.

I do think that this process was relatively straightforward though in part this is because I am using Office 365. I am not sure what the process would be like if I was using a Gmail or Yahoo account. This is something that I might add later after some investigation.

 

Apps

So this is where the gap between Windows Phone 8 and iPhone starts to show. I had a number of apps on my iPhone which I have struggled to get replacements for on the Nokia.

I use the following apps a lot:-

iPhone App

Description

National Rail Train Timetable

This is an app which allows you to quickly find out train times, where your train is on your journey, which platform the train is leaving from etc.

Podcast

This comes free with the iPhone and allowed me to keep up to date with the latest and greatest podcast from the likes of .Net Rocks, Hanselminutes, SharePoint Pod Show, The Moss Show and BBC Radio 4!

Spotify

Listen to music that I want to, download for offline streaming

2Do Task app

This app I used to manage my task list and sync up between the Toodle.com website and app.

Google Maps

The awesome app which allows you to find out how to get somewhere. It knows where you are and where the destinations are

Facebook

Allows me to connect with my friends on Facebook

LinkedIn

Allows me to connect with colleagues and business associated

Twitter

Allows me to keep in contact with all the goings on from Twitter

Nike+

Keeps me fit, records my progress, maps any runs. Gives me feedback to keep running when I started to tire.

Angry Birds

The classic game

Angry Birds – Space

The classic game with a twist

 

Windows Phone App Alternatives

So taking the list of Apps from above these are the apps that I moved to.

iPhone App

Windows Phone App

Thoughts

National Rail Timetable App

National Rail Timetable App

 

Podcast App

PodCatcher

Initially I tried a couple of different apps, this was the better of the two though had problems when I upgraded to the bought version. Recently there have been two upgrades which provide much better features. I still prefer the Apple app though

Spotify

Spotify

Apparently this has just been released. I haven’t tried this yet.

Thanks Dave for the update.

2Do Task App

Calendar

I actually prefer the Windows Phone app as it syncs up with my Outlook tasks on my desktop and also other devices which makes it much more useful and simplifies the process to know what I need to get done.

Google Maps

Nokia Maps

Not used Nokia Maps a huge amount but it seems pretty good. There is also the Nokia Drive App which is great when you need a SatNav type device, the only thing is that you need data connection for it to work in the most efficient manner.

Facebook

Facebook

I really like the Windows Phone interface over the iPhone interface. Took me a while to work out how to get back to my homepage though.

Linked In

LinkedIn

Again I really like the Windows Phone interface over the iPhone interface

Twitter

Twitter

The iPhone twitter app seems better and found it less clunky than the Windows App version

Nike+

Runner Pro

Still working on this, like the Nike+ app over the runner pro but I haven’t used the Runner Pro as much as the Nike+ app.

Angry Birds

Angry Birds

Classic game performs well on both platforms

Angry Birds Space

Angry Birds Space

Classic game performs well on both platforms

 

Keyboard

The one area that I have struggled with on my transition from iPhone to Windows is the keyboard. I remember the iPhone keyboard was a little strange when I first started using the phone but I got used to it.

However, the Windows Phone hasn’t been so easy, I have been using the phone for a month now and I still consistently hit the comma key instead of the space bar. This is very frustrating but I am sure I will stop doing it at some point!

 

Back Button

The Windows Phone has three buttons at the bottom of the phone, unlike the iPhone with its single ‘Home’ button. I really like the Back button, it’s great when you are moving between a text message and say the IE app to copy information back and forth.

The back button is also a godsend when you start typing a reply to a text, if you close the message app and then click on the messages app again it will reset your session and you will lose the message that you were typing. However if you click on the back button a few times you will be returned back to the message app with your message typed as you left it.

 

Conclusion

The process to move from iPhone to Nokia Lumia was a pretty straightforward process. There are a few steps but generally it’s pretty painless. Overall I am pretty impressed with the Windows Phone OS and really like the screen. The iPhone screen seems really small and difficult to use now that I have got used to the Nokia.

There are some missing apps, most noticeably the Spotify and Nike+ apps and I hope that these are rectified soon.