Office 365 List Column Name Issue Breaks JavaScript

BLUF: I have found an issue in the Office 365 (SharePoint Online) list column name naming convention that produces unexpected results, especially in JavaScript and is incompatible with SPServices!

Update 1! During a quick Twitter chat with @sympmarc (who is amazing), he said this occurs when you create a column from the list’s main page by clicking “edit this list”, which uses Quick Edit mode, rather than creating the column from the list settings page. See below:

If you use Quick Edit mode to add columns it will just assign them a random string of characters as the Field name.

Update 2! Use this simple code to get the internal column name via SPServices. Thanks @sympmarc.

I was putting together a demo using Office 365, jQuery, jqPlot, and SPServices when I encountered an issue that actually broke my SPServices code. After some investigation I found this issue was with Office 365 and can cause any number of issues with not just SPServices but many other scripts or Apps or code. When you create a list in Office 365 and you then create a new columnĀ for that list you expect it to look like the following example:

The first time I created this demo, one of my list names wasn’t the same when I tried to access it. The column name is “Total” but showed as “fe6y”. It looked like this:

I thought this was odd but since the demo worked, I let it go and continued on. I mentioned this at the demo and no one seemed to know why. Then I needed to transfer this demo to my developer Office 365 tenant. When recreating it, I ran into this exact same issue on the exact same column and exact same list (weird). Worse though it was a name that broke my SPService’s JavaScript. So I created a second column and it worked perfectly. Check out the two columns below:

Click to enlarge

I will update after I ask around Twitter and log a bug with Office 365 support. Have you ever seen this? Do you know why it is happening?

If you use Quick Edit mode to add columns it will just assign them a random string of characters as the Field name. Always create columns from the List Settings page!

Tim Ferro

  • Great post. This threw me off quite a few times when I started working with Office 365 sites and reporting them with HighCharts & SPServices. A few late night 5 hour energy fired troubleshooting sessions later, I learned to check the “field” value in URL. I didn’t know that Quick Edit > Add Column was the culprit though. Better late than never. Adios new columns from Quick Edit + clicks & hello List Settings > Create Column. Or just SharePoint designer Add columns. :)

Leave a Comment