
Grab your gear: The official Sanity swag store
Read Grab your gear: The official Sanity swag storeI understand the frustration! This is actually expected behavior in Sanity Studio. The initialValue property only applies when a document is first created - it doesn't retroactively apply to existing documents or even to fields in documents that are already open.
Here are the key things to understand:
How initialValue works:
Field-level initialValue in your schema only sets the value when:
If you're testing on an existing document or a document that's already been created, you won't see the initial value applied.
To set a boolean field to true by default:
defineField({
name: 'approved',
type: 'boolean',
initialValue: true
})This should work, but as documented, you need to:
Common gotchas:
initialValue, that draft won't have itinitialValue is set on the client side when the document form initializes, so it won't show up in existing documents in your datasetTo test it properly:
If you need more complex initialization logic or want to set values based on context (like the current user or parent document), you can use Initial Value Templates in your sanity.config.ts file instead.
Hope this clears things up! Let me know if you're still seeing issues after creating a fresh document.
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