Date metadata field
Date metadata field
A metadata field of type date is displayed to a user as a date picker.
Create a date field
A date field can be added to a metadata template either when creating a
metadata template, or when updating a
template with the addField operation.
The required attributes for a date field are a type, a displayName and a
key.
{
"scope": "enterprise",
"displayName": "Contract",
"fields": [
{
"type": "date",
"key": "effective_date",
"displayName": "Effective Date",
"description": "The effective date when the contract goes in effect",
"hidden": false
}
]
}
Optionally a description can be provided that is shown to a user in the UI,
and the field can be set to hidden to hide it from users in the web and mobile
apps.
Update a date field
A date template field can be updated by updating the
template it belongs to. Updates to templates happen through
operations to ensure that any template that is already assigned to a file or
folder is updated as well.
When updating a date metadata field the only relevant operation is the
editField operation which can be used to change the field's key,
displayName, description and hidden values.
[
{
"op": "editField",
"fieldKey": "effective_date",
"data": {
"displayName": "Effective Contract Date",
"description": "The contract's effective date",
"key": "effective_contract_date",
"hidden": true
}
}
]