List fields with same GUID

Addison Jiang 0 Reputation points
2023-05-09T09:12:54.67+00:00

User's image

WXWorkCapture_16836233289930

Hi team,

I wonder why this is the case, and how can I delete the Hashtag_0 ?

Thanks.

SharePoint Server
SharePoint Server
A family of Microsoft on-premises document management and storage systems.
2,273 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. ChengFeng - MSFT 5,015 Reputation points Microsoft Vendor
    2023-05-10T09:28:39.8333333+00:00

    Hi @Addison Jiang ,

    Judging from the screenshots and scenarios you provided, the cause of the problem is:

    1. When there are multiple columns with the same GUID in list(). 

    This could be due to manually specifying the GUID when creating the column, or a problem while migrating the column. In this case, you won't be able to uniquely identify the field using the GUID, and you may have problems deleting the field.

    Please try this method to remove duplicate columns:

    $HashFields =  $web.Fields | Where {$_.Title -like 'HashTags_0'}
      foreach($F in $HashFields)
      {
        $F.Title
        if(!$F.Sealed){$F.delete()}
      }
    $web.Update()
    $web.Dispose()
    
    

    Here is a link about how to delete duplicate fields for your reference:

    sharepoint server - Error exporting the site field named "HashTags_0"." - SharePoint Stack Exchange

    I hope this helps you solve your problem!

    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.

    Best Regards

    Cheng Feng

    0 comments No comments