
Grab your gear: The official Sanity swag store
Read Grab your gear: The official Sanity swag storeBased on what you're trying to do, you can't directly reference another field's value from a different document in the way you've described. However, there are a few approaches that can achieve similar results:
initialValue with Async Function (Recommended for your use case)You can use an async function in the field's initialValue to fetch data from another document. The initialValue function receives a context object that includes getClient():
{
name: 'address',
title: 'Address',
type: 'text',
readOnly: true,
initialValue: async (props, context) => {
const {getClient} = context
const client = getClient({apiVersion: '2024-11-01'})
const settings = await client.fetch(
`*[_type == "settings"][0].address`
)
return settings
},
description: 'This field is set on the settings page',
}Important caveat: The initialValue only runs when the document is first created. It won't update if the settings document changes later. This is literally an "initial" value, not a live reference.
If you want to maintain a live connection to the settings document, use a reference field:
{
name: 'settingsRef',
title: 'Settings',
type: 'reference',
to: [{type: 'settings'}],
hidden: true, // Hide it from editors if you always want it to reference settings
}Then in your queries, you can dereference it to get the address:
*[_type == "referExample"] {
...,
"address": settingsRef->address
}If you just want to display the value from another document in the Studio UI (not actually store it), you can create a custom input component that fetches and displays the value from your settings document. This would be read-only by nature and always show the current value.
If you're creating documents programmatically or through specific workflows, Initial Value Templates give you more control and context-awareness when setting initial values across multiple fields.
Sanity doesn't support "live" field references where one field automatically mirrors another field's value from a different document. This is by design—each document is independent, and relationships are established through reference fields that you dereference at query time.
For your specific use case of showing an address from a settings page, I'd recommend either:
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