Creating a custom content-type for a list & use some built-in columns

%3CLINGO-SUB%20id%3D%22lingo-sub-1369258%22%20slang%3D%22en-US%22%3ECreating%20a%20custom%20content-type%20for%20a%20list%20%26amp%3B%20use%20some%20built-in%20columns%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1369258%22%20slang%3D%22en-US%22%3E%3CP%3EMy%20understanding%20is%20that%20if%20I%20have%20a%20list%20which%20needs%20custom%20columns%20(aka%20fields)%20I%20should%20create%20a%20content-type%3B%20create%20the%20custom%20fields%20add%20them%20to%20the%20content-type%20and%20associate%20the%20content-type%20with%20the%20list.%3CBR%20%2F%3E%3CBR%20%2F%3EI'm%20a%20bit%20confused%20when%20it%20comes%20to%20combining%20custom%20fields%20with%20built-in%20fields%20and%20after%20some%20advice%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3COL%3E%3CLI%3EShould%20I%20create%20and%20add%20a%20custom%20content-type%20and%20add%20this%20along%20with%20the%20built-in%20contact%20type%20(says%20Contacts)%20to%20the%20list%3F%3C%2FLI%3E%3CLI%3EShould%20I%20build%20a%20custom%20content-type%20made%20up%20of%20custom%20fields%20and%20built-in%20fields%3F%3COL%20class%3D%22lia-list-style-type-lower-alpha%22%3E%3CLI%3EIf%20so%20can%20I%20rename%20the%20built-in%20field%2C%20for%20example%20%22Title%22%20to%20%22Project%20Title%22%2C%20how%20would%20I%20reference%20this%20in%20PNP%20PowerShell%3F%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FLI%3E%3C%2FOL%3E%3C%2FLI%3E%3C%2FOL%3E%3CP%3EMany%20thanks%20for%20any%20help%3CBR%20%2F%3E%3CBR%20%2F%3EPaul%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1369258%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EPnP%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1369503%22%20slang%3D%22en-US%22%3ERe%3A%20Creating%20a%20custom%20content-type%20for%20a%20list%20%26amp%3B%20use%20some%20built-in%20columns%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1369503%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F23526%22%20target%3D%22_blank%22%3E%40Paul%20Bendall%3C%2FA%3E%26nbsp%3BI%20have%20to%20say%20that%20in%20many%20years%20of%20using%20SharePoint%20I%20have%20rarely%20created%20custom%20content%20types.%20In%20most%20cases%20I%20just%20create%20the%20columns%20I%20need%20in%20the%20list%20and%2C%20if%20necessary%2C%20add%20columns%20from%20the%20site%20columns.%20But%20generally%20I%20just%20add%20columns%20and%20don't%20worry%20too%20much%20about%20content%20types.%20Others%20will%20probably%20react%20in%20horror%20to%20that!%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EYou%20can%20rename%20columns%20but%20bear%20in%20mind%20if%20you%20rename%20columns%20like%20Title%20to%20Project%20Title%2C%20in%20other%20apps%20you%20will%20almost%20certainly%20need%20to%20use%20the%20original%20internal%20name%20for%20the%20column%2C%20i.e.%20Title.%20That%20is%20certainly%20the%20case%20in%20Power%20Apps%20and%20Power%20Automate%20and%20I%20suspect%20is%20with%20PowerShell%20as%20well.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ENot%20sure%20I've%20helped%20much.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ERob%3CBR%20%2F%3ELos%20Gallardos%3CBR%20%2F%3E%3CFONT%20size%3D%222%22%20color%3D%22%23333399%22%3EMicrosoft%20Power%20Automate%20Community%20Super%20User%3C%2FFONT%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1397191%22%20slang%3D%22en-US%22%3ERe%3A%20Creating%20a%20custom%20content-type%20for%20a%20list%20%26amp%3B%20use%20some%20built-in%20columns%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1397191%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F174092%22%20target%3D%22_blank%22%3E%40Rob%20Elliott%3C%2FA%3E%26nbsp%3Bsorry%20for%20the%20large%20delay%20in%20responding.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ESometimes%20I%20get%20bog%20down%20worrying%20about%20best%20practice.%20Thanks%20for%20your%20input.%20What%20I%20have%20done%20is%20look%20at%20the%20columns%20I%20need%20in%20my%20list.%20If%20the%20column%20is%20similar%20to%20something%20built-in%20then%20I'd%20associate%20that%20content-type%20with%20the%20list%20and%20then%20the%20field%20(if%20necessary%20renaming%2C%20mostly%20Title%20due%20its%20special%20usage).%20If%20a%20built-in%20column%20doesn't%20meet%20my%20requirement%20I'll%20create%20one%20and%20an%20associated%20content-type.%3CBR%20%2F%3E%3CBR%20%2F%3EAt%20first%20I%20assumed%20that%20content%20types%20and%20fields%20need%20to%20be%20created%20ahead%20of%20the%20list.%20However%2C%20as%20the%20list%20is%20a%20scoping%20boundary%20then%20it%20seems%20that%20a%20combination%20of%20adding%20columns%20before%20and%20after%20is%20acceptable.%20For%20example%20Title%20rename%20I%20do%20after%20list%20creation%20to%20ensure%20it%20affects%20only%20the%20instance%20of%20the%20field.%3CBR%20%2F%3E%3CBR%20%2F%3EThanks%20for%20your%20input%2C%20it%20helped%20me%20come%20to%20the%20conclusion%20I%20describe%20above.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ECheers%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EPaul%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
Contributor

My understanding is that if I have a list which needs custom columns (aka fields) I should create a content-type; create the custom fields add them to the content-type and associate the content-type with the list.

I'm a bit confused when it comes to combining custom fields with built-in fields and after some advice:

 

  1. Should I create and add a custom content-type and add this along with the built-in contact type (says Contacts) to the list?
  2. Should I build a custom content-type made up of custom fields and built-in fields?
    1. If so can I rename the built-in field, for example "Title" to "Project Title", how would I reference this in PNP PowerShell?

Many thanks for any help

Paul

2 Replies
Highlighted

@Paul Bendall I have to say that in many years of using SharePoint I have rarely created custom content types. In most cases I just create the columns I need in the list and, if necessary, add columns from the site columns. But generally I just add columns and don't worry too much about content types. Others will probably react in horror to that!

 

You can rename columns but bear in mind if you rename columns like Title to Project Title, in other apps you will almost certainly need to use the original internal name for the column, i.e. Title. That is certainly the case in Power Apps and Power Automate and I suspect is with PowerShell as well.

 

Not sure I've helped much.

 

Rob
Los Gallardos
Microsoft Power Automate Community Super User

Highlighted

@Rob Elliott sorry for the large delay in responding.

 

Sometimes I get bog down worrying about best practice. Thanks for your input. What I have done is look at the columns I need in my list. If the column is similar to something built-in then I'd associate that content-type with the list and then the field (if necessary renaming, mostly Title due its special usage). If a built-in column doesn't meet my requirement I'll create one and an associated content-type.

At first I assumed that content types and fields need to be created ahead of the list. However, as the list is a scoping boundary then it seems that a combination of adding columns before and after is acceptable. For example Title rename I do after list creation to ensure it affects only the instance of the field.

Thanks for your input, it helped me come to the conclusion I describe above.

 

Cheers

 

Paul