Why extra columns getting added when created list programmatically through CSOM?

Yuvraj Patil 441 Reputation points
2023-04-06T12:24:55.8666667+00:00

Hello,

I am creating some lists programmatically and extra columns are getting added into list, why is this happening?

  1. For pictures library with video and audio files as list item an extra column named "VideoIdentifiers" getting added/created.
  2. When created document library with Pictures content type with some list items then extra columns are getting created/added like "Date Picture Taken", "Picture Dimensions" etc.

Please tell me why this is happening? and how to stop it?
Thanks in advance! Yuvraj.

Microsoft 365 and Office SharePoint Development
Microsoft 365 and Office SharePoint For business Windows
Microsoft 365 and Office SharePoint Server Development
0 comments No comments
{count} votes

Accepted answer
  1. RaytheonXie_MSFT 40,471 Reputation points Microsoft External Staff
    2023-04-07T02:55:35.3933333+00:00

    Hi @Yuvraj Patil,

    You could check if your content type have site columns. If you apply the content type in your list, the site columns in your content type will also added to your list. To advoid this, you can remove the site column in content type gallery. Please refer to following steps

    1. Go to the Site Settings.
    2. Under Web Designer Galleries, select Site content types and choose the content type you are using.

    Web Designer Galleries options from the Site Settings page in SharePoint Online

    enter image description here


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment". Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.