1

I have a column in a list of over 15,000 items. The column we want to delete was recently created, and we were going to populate it/backfill the values, but then decided to split it into 3 fields (creating more columns, as a result), and so now wanted to delete the old one.

Tried:

  • SP doesn't let you delete it using List Settings
  • SPD gives "Could not save the field changes to the server"
  • Going into Access and linking to the list and attempting to delete it that way yields the error:

"Table is too large for this change to be saved"

Anyone ever worked around this one?

Writing anything to do this that requires installing anything on the server (including 3rd-party tools) or deploying managed code (WSPs, etc.) is out, as those that control the SharePoint servers want them to be "clean" and nothing is allowed to be installed on them except SP. Also, I do not have direct access to this server - it is managed by a separate group of admins - so I do not believe I can use PowerShell for this, either.

3 Answers 3

4

You can increase the list view thresh hold in central administration temporarily to allow this column to be deleted.

In Central Administration go to Application Management -> Manage Web Applications -> Click your web app -> click General Settings in the ribbon -> Resource Throttling and set the List View Threshold to 20,000 or wait until the happy hour where large list operations are acceptable, if configured in the Resource Throttling popup.

Delete your column, then revert the setting.

4
  • Unfortunately, no access to the server includes Central Admin. There is a window, but it's set for 9-10 p.m. for their group to do maintenance. It might be an option as I do have remote access one day a week and could perhaps log in during that time, but would leave that for a last resort.
    – vapcguy
    Jan 6, 2016 at 18:03
  • You don't need server access to access Central Admin, it is just a web site assuming you have access. It should be accessible via http(s)://servername:port/default.aspx. The other group could configure this for you, you delete the column, then they revert. It is a trivial config change to make and revert. Jan 6, 2016 at 18:05
  • To get the port, I would, since I can't access Computer Management on the IP I get for the site name I have in order to access IIS and find it out for myself. Plus most places block Central Admin from being accessible from outside the server by only setting it up on localhost, instead of servername. And it's managed by another group of admins, anyway - they wouldn't like me stepping on their toes. I can ask if they could change the time or could do this, though.
    – vapcguy
    Jan 6, 2016 at 18:13
  • Yeah, they said "wait til the happy hour"... Figures. Thanks, though - I'll probably end up going with this.
    – vapcguy
    Jan 6, 2016 at 23:58
4

Do you have Visual Studio access and are knowledgeable with C#? You can use the Client Side Object Model (CSOM) against the server if so since Central Admin and PowerShell are not options for you. Just create a C# console application and run something similar to what is below. You'll need to add the Microsoft.SharePoint.Client to your references.

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Microsoft.SharePoint.Client;

namespace SharePoint_Column_Remover
{
    class Program
    {
        static void Main(string[] args)
        {
            // Starting with ClientContext, the constructor requires a URL to the 
            // server running SharePoint.
            ClientContext context = new ClientContext("https://yourintranetdomain/sitename/");

            // SharePoint Web
            Web web = context.Web;
            context.Load(web);
            context.ExecuteQuery();

            // SharePoint List
            List list = web.Lists.GetByTitle("The List Name");
            context.Load(list);
            context.ExecuteQuery();

            // SharePoint List Fields
            FieldCollection fieldCol = list.Fields;
            context.Load(fieldCol);
            context.ExecuteQuery();

            foreach (Field field in fieldCol)
            {
                if (field.InternalName.ToString() == "Name of Column")
                {
                    Console.WriteLine(field.InternalName.ToString());
                    Console.WriteLine(field.ReadOnlyField);
                    Console.WriteLine("");

                    // Unrem this and run it one time if field is read only
                    //field.ReadOnlyField = false;
                    //field.Update();
                    //context.ExecuteQuery();

                    // Unrem this and run it to delete the column
                    //field.DeleteObject();
                    //context.ExecuteQuery();
                }
            }

        }
    }
}
5
  • 1
    I'll add you do NOT need to run this off the actual server itself. Hence the beauty of the CSOM. Jan 6, 2016 at 18:23
  • I had to add Microsoft.SharePoint.Client and Microsoft.SharePoint.Client.Runtime references to the project, and had to do "Name of Column" like "Name_x0020_of_x0020_Column", but I got it to run. It came back with an error, though: The attempted operation is prohibited because it exceeds the list view threshold enforced by the administrator. Otherwise this would've been a GREAT answer and appreciate you posting it.
    – vapcguy
    Jan 6, 2016 at 19:22
  • 1
    Auhh. So back to @ericalexander 's point you'll have to get them to temporarily increase the threshold via CA. Was worth a shot. :) Jan 6, 2016 at 21:47
  • Actually, so I tried this during the "happy hour" of maintenance and it worked after I added some try...catches. It gave me some enumeration exception on the foreach line afterwards, but it still deleted the column, so I was happy. Wish I could mark both yours and the other as the "answer", but since I probably could've just gone to the list settings and deleted the column during this maintenance time, probably overkill for the average admin. Very handy, though.
    – vapcguy
    Jan 7, 2016 at 2:10
  • I think Eric's answer is definitely the better of the two (more appropriate). Glad to hear it got taken care of for you. Jan 7, 2016 at 3:20
2

I, too, was unable to delete a column from a SharePoint list that had 5,400 items. Same error: "exceeds the list view threshold".

The column was an enhanced rich text column, and a colleague suggested I convert the column to simple text and try again to delete it.

It worked!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.