Tim is a Senior Consultant at ThreeWill. He has 15 years of consulting experience designing and developing browser-based solutions using Microsoft technologies. Experience over the last 8 years has focused on the design and implementation of SharePoint Intranets, Extranets and Public Sites.
SharePoint Choice Options Issues
I was recently reminded of what I’ll call a “gotcha” that exists with SharePoint Choice columns. As I was working on a migration from SharePoint On-Premise to SharePoint Online (SPO), I noticed that some list items were not migrating properly. As I investigated the cause of the issue, I realized that over a period of time some of the valid choice options defined in the source SharePoint list had been changed. And they had been changed for good reason. However, the problem was that, when you change a choice option in a column definition, the items in the list with the “old choice option” value do not get changed automatically.
Let me paint a typical scenario. Customer A creates a Project Status list in SharePoint. They want to track the Project status, so they create a new Choice column and define valid values of Not Started, In Progress, and Closed. The Choice columns is configured so that “fill-in options” values are not allowed, since these would not be valid statuses. At some point, a creative SharePoint User decides to change the Project Status column options definition from “Not Started” to “01-Not Started”, “In Progress” to “02-In Progress” and “Closed” to “03-Closed”. The primary reason for this change is to allow these projects to sort in the order of “Not Started”, “In Progress” and “Closed”. This is all well and good if the SharePoint user realizes that changing the option values in the column definition does NOT change the values that have already been stored in the list. Values already stored in the list must be updated to match the values in the column definition or potential problems will occur later….such as during migration time.
During migration, the list definition is copied from the source SharePoint instance to the target SharePoint instance. Next, the list items are copied. In the scenario described above, there are old/ values stored in the source list and these will not be copied to the target list. This is because they have a Project Status value that is no longer valid in the choice column definition.
How to Fix the Problem During a Migration
One option is to add all the Project Status values from the source list into the target Project Status column definition. This makes all the old Project Status values valid in the target list so they can be copied during migration. A second and possibly cleaner option, is to update the Project Status column definition in the target list to accept “fill-in” values. After all the old data is migrated from the source to the target list, this configuration can be updated to NOT allow “fill-in” values. However, at some point, the data in the list needs to be either updated manually or updated with a PowerShell script to match the valid project status values in the Project Status column definition.
Having consistent Project Status data will be important as you slice and dice your data using SharePoint views to provide some intelligence to the raw data. Hopefully this helps you if you encounter this problem. Migrations can be complicated, this is just one tip that I’ve discovered over time. Here are some other related articles that I’ve written: