Forum Discussion
Change Primary Key/Title Column in SharePoint List
Hello!
I was wondering if it's possible to change the primary key/title column in a SharePoint list. When I made the list I renamed this default title column to another name but I was unaware that it would be used as the identifying column in the list. This is giving me issues because when users search for an item in the list in a SharePoint site, the name of the entry that pops up is this title column - which I'm presuming is because it is the primary key column - but I would like it to show another field instead. See in the attached image: the blue text is the value of the title column but it is not a very efficient identifier for users performing the search.
Thus, the only way I can think of fixing my issue is by switching the column that SharePoint considers the title/primary column. Or if I hide this column, would the value that appears in the blue text be different?
1 Reply
- michalkornetIron Contributor
Hi hhuynhfm,
what do you think about creating a new column named 'Identifier' (or something similar) for the values from your current Title column, and using the predefined Title column for the friendly name of the file/item?
If you would like to use a custom layout, you can explore a combination of search results pages:
https://learn.microsoft.com/en-us/microsoftsearch/create-search-results-pages
and the PnP Search Web Part:
https://microsoft-search.github.io/pnp-modern-search/
However, this might be too complex for this case.