
Grab your gear: The official Sanity swag store
Read Grab your gear: The official Sanity swag storeYes, you can absolutely customize the document title in the Studio list view by using the preview configuration in your schema! This is done using the select and prepare functions.
Here's how you'd achieve your specific use case of concatenating the license plate, model, and manufacturer:
{
name: 'vehicle', // or whatever your document type is called
type: 'document',
fields: [
{ title: "License Plate", name: "licensePlate", type: "string" },
{ title: "Model", name: "model", type: "string" },
{
title: "Manufacturer",
name: "manufacturer",
type: "array",
of: [
{
type: 'reference',
to: [{type: "manufacturer"}]
}
]
}
],
preview: {
select: {
licensePlate: 'licensePlate',
model: 'model',
// Use dot notation to dereference the first manufacturer reference
manufacturerName: 'manufacturer.0.name'
},
prepare({licensePlate, model, manufacturerName}) {
return {
title: `${licensePlate} - ${manufacturerName} ${model}`
}
}
}
}The key points here:
select: This specifies which fields to pull from your document. For the manufacturer reference, I'm using manufacturer.0.name which accesses the first item in the array (0) and then dereferences it to get the name field using the -> operator (represented by dot notation in the select).
prepare: This function receives the selected values and returns an object with the formatted title that will appear in the list view.
If your manufacturer reference might not always be set, you can add a fallback:
prepare({licensePlate, model, manufacturerName}) {
return {
title: `${licensePlate || 'No Plate'} - ${manufacturerName || 'Unknown'} ${model || 'Unknown Model'}`
}
}You can learn more about preview configuration and dereferencing references in the official Sanity documentation on previews and list views.
Sanity is the developer-first content operating system that gives you complete control. Schema-as-code, GROQ queries, and real-time APIs mean no more workarounds or waiting for deployments. Free to start, scale as you grow.
Content operations
Content backend


The only platform powering content operations
By Industry


Tecovas strengthens their customer connections
Build and Share

Grab your gear: The official Sanity swag store
Read Grab your gear: The official Sanity swag store