locked
Replace Title with a New Content Type RRS feed

  • Question

  • In SharePoint online (365): When I create a custom list it has a Title field which has various good functions but is restricted to a single line of text, which cannot be changed. It is of the content type "Item".  However I am able to create a new content type and add it to the list, and remove the Item content type. So far I have only added new content types that also inherit from "Item" and so are also single line of text. I seems that I should be able to add a content type that is choice or calculated column. I am not familiar enough with the existing content types to pick one like that. I would like to add a content type that is drop down and remove the Item content type and have the new content type take the place of "Title" in the forms and being linked to edit and display. 

    Which content type should I add?

    Thanks


    GreenCapitalist

    Monday, July 20, 2020 2:42 PM

Answers

  • Hello GreenCapitalist,

    This is by design. The content type "Item" is the parent content type for all list content types. So when creating new list content type, we would always have a "Title" column. And by default, we cannot remove it.

    As a workaround, you could create a new Choice column and make the "Title" column hidden.

    To make the choice column linked to edit and display, there is no OOB ways to change this.

    You have to Change the field schema xml, you need to add below in the schema xml:

    LinkToItem = "TRUE" LinkToItemAllowed = "Required" ListItemMenu = "TRUE" ListItemMenuAllowed = "Required"

    Use pnp powershell set-pnpfied to change this: 

    Set-PnPField -Identity "Choice"-values @{SchemaXml='<Field Type="Choice" DisplayName="Choice" Required="FALSE" LinkToItem = "TRUE" LinkToItemAllowed = "Required" ListItemMenu = "TRUE" ListItemMenuAllowed = "Required" EnforceUniqueValues="FALSE" Indexed="FALSE" Format="Dropdown" FillInChoice="FALSE" Group="Custom Columns" ID="{ed40b1f5-4e69-4691-b88c-f41114bda218}" SourceID="{7359b8e7-aa22-4cd8-a54f-246b1e684506}" StaticName="Choice" Name="Choice" Version="5"><Default>1</Default><CHOICES><CHOICE>1</CHOICE><CHOICE>2</CHOICE><CHOICE>3</CHOICE></CHOICES></Field>'}

    Best Regards,

    Michael Han


    "SharePoint" forums will be migrating to a new home on Microsoft Q&A !
    We invite you to post new questions in the "SharePoint" forums' new home on Microsoft Q&A !


    Tuesday, July 21, 2020 10:29 AM