**Source URL:** https://general.veevavault.dev/quality/mdl/component-types/docfield.md

# Docfield

**Class: ** `metadata`

Attribute of a document associated to one or more document types.

Learn about <a href="https://platform.veevavault.help/en/lr/592" target="_blank">Document Fields in Vault Help</a>.

| Attribute | Metadata | Description |
| --- | --- | --- |
| secure_relationship | Type: Boolean | Enables relationship security on a referenced object. |
| shared | Type: BooleanRequired | Indicates whether the field is shared or local. |
| multi_value | Type: Boolean | Indicates whether the field accepts multiple values. |
| display_section | Type: StringRequiredMax length: 1500 | Name of the display section. For example, Docfieldlayout.general_properties__v |
| formula | Type: ExpressionMax length: 4000 | An expression surrounded in [ ] character combination. |
| blank_fields | Type: StringMax length: 1500 | options&#58; zeros blanks |
| controlling_field | Type: StringMax length: 1500 | Controlling field name, if any. |
| scale | Type: Number | Applicable to fields of type number only. |
| default_security | Type: StringMax length: 1500 | options&#58; editable readonly hidden |
| security_override_editable | Type: StringMax length: 1500Multi-value | To specify users&#58; User.user@domain.com. To specify groups&#58; Group.public_key__v. |
| security_override_readonly | Type: StringMax length: 1500Multi-value | To specify users&#58; User.user@domain.com. To specify groups&#58; Group.public_key__v. |
| security_override_hidden | Type: StringMax length: 1500Multi-value | To specify users&#58; User.user@domain.com.To specify groups&#58; Group.public_key__v. |
| set_on_create_only | Type: Boolean | Can only set if the user has a proper MDL admin permission. |
| editable | Type: Boolean | Whether the field is editable by the user. The value here is specific to the user and depends on security_overrides. |
| hidden | Type: Boolean | Indicates whether the field is hidden in the UI. The value here is specific to the user and depends on security_overrides. |
| defined_in | Type: StringMax length: 1500 | The Doc Type this field belongs to (local fields only). e.g. Doctype.my_doc_type__c |
| used_in | Type: StringMax length: 1500Multi-value | The Doc Type(s) this field is used in (shared fields only). e.g. Doctype.my_doc_type__c |
| relationship_type | Type: StringMax length: 1500 | Can only return “reference” at this time. |
| relationship_name | Type: StringMax length: 1500 | Auto-generated name based on the field name and the Vault object. |
| lookupObjectFieldKey | Type: StringMax length: 1500 | Reference to Doc field component. Used for the Lookup field type. |
| lookupObjectId | Type: StringMax length: 1500 | Reference to Object component. Used for the Lookup field type. |
| lookupFieldId | Type: StringMax length: 1500 | Reference to Object field component. Used for the Lookup field type. |
| relationship_criteria | Type: StringMax length: 1500Multi-value | The VQL used to constrain records in the referenced Object |
| no_copy | Type: Boolean | When true a value will not be set in a copied document. Cannot be true when required is true. |
| can_change_section | Type: Boolean | For internal Veeva use only. |
| can_change_required | Type: Boolean | For internal Veeva use only. |
| can_change_disabled | Type: Boolean | For internal Veeva use only. |
| can_change_multiple | Type: Boolean | For internal Veeva use only. |
| can_change_no_copy | Type: Boolean | For internal Veeva use only. |
| picklist | Type: StringMax length: 1500 | Reference to Picklist component. Used for the Picklist field type. |
| help_content | Type: StringMax length: 500 | UI-friendly help string |
| max_length | Type: Number | Applicable to fields of type string only. |
| active | Type: BooleanRequired | Indicates whether the field is active. |
| required | Type: BooleanRequired | Indicates whether the field is required. |
| type | Type: StringRequiredMax length: 1500 | options&#58; String Number Boolean Picklist Date URL Formula ObjectReference Lookup |
| default_value | Type: StringMax length: 1500Multi-value | The default value used when the field is not set. |
| object | Type: StringMax length: 1500 | Possible values supported are names of VOF objects, User, Group, and Lifecycle. |
| queryable | Type: Boolean | Indicates whether the field is queryable through VQL. This attribute is read-only. |
| scope | Type: StringMax length: 1500 | options&#58; Document DocumentVersion Regular users can create Document scoped fields only.Creating DocumentVersion scoped fields requires special security permissions. |
| min_value | Type: Number | Applicable to fields of type number only. |
| max_value | Type: Number | For Number type fields, this is the maximum value allowed. For ObjectReference type fields where multi-value is set to true, this is the maximum number of records that can be selected in the field. If not specified, the default is 250 values. This attribute is not editable for ObjectReference type fields, but may have a specific value set for some system-managed fields. If the value is greater than 500, VQL queries return an unordered list. |
| label | Type: StringRequiredMax length: 1500 | UI-friendly string in the Vault's base language. |

### Supported Operations {#supported-operations}

| Operation | Support |
| --- | --- |
| Create | Yes |
| Recreate | Yes |
| Alter | Yes* |
| Drop | Yes |
| Rename | Yes |
| Describe | Yes |
| Generate Recreate | Yes |
| Queryable | No |
**Notes:**

<ul style="padding-left:1.5em;margin-top:0.5rem"><li>**Alter:** <span>MDL Operation may not be supported for some multi-value attributes.</span></li></ul>


---

**Previous:** [Docatomicsecurity](/quality/mdl/component-types/docatomicsecurity)  
**Next:** [Docfielddependency](/quality/mdl/component-types/docfielddependency)