ObjectTemplateAttribute
class flow_api.object_template_attribute.ObjectTemplateAttribute(select=None, cls=None, init=None, by='id', allow_normal=True, allow_deleted=False, commit=False, allowed_values=<class 'flow_api.system.NotSet'>, datatype=<class 'flow_api.system.NotSet'>, default_reference_id=<class 'flow_api.system.NotSet'>, default_value=<class 'flow_api.system.NotSet'>, description=<class 'flow_api.system.NotSet'>, is_hidden=<class 'flow_api.system.NotSet'>, is_nullable=<class 'flow_api.system.NotSet'>, is_unique=<class 'flow_api.system.NotSet'>, name=<class 'flow_api.system.NotSet'>, object_template_id=<class 'flow_api.system.NotSet'>, reference_object_template_id=<class 'flow_api.system.NotSet'>, reference_record_type=<class 'flow_api.system.NotSet'>, searchable=<class 'flow_api.system.NotSet'>, silent_update=<class 'flow_api.system.NotSet'>, sort_order=<class 'flow_api.system.NotSet'>, debug=False)
Base class: Row
A definition of an attribute of an object_template.
Behaves similarly to database column with properties like datatype, nullability, uniqueness.
Parameters
| Name | Type | Description |
|---|---|---|
| allow_deleted | bool | |
| allow_normal | bool | |
| allowed_values | Union | The fixed set of allowed values for a datatype=ALLOWED_VALUES attribute. A JSON list of {"const": <stored string value>, "label"?: <display label>} objects; the Console renders a dropdown and off-list writes are rejected. Required (non-empty) when datatype is ALLOWED_VALUES; must be NULL otherwise. |
| by | str | |
| cls | Optional | |
| commit | bool | |
| datatype | Union | The datatype of the attribute. |
| debug | bool | if set, the content of the data being written will be logged. |
| default_reference_id | Union | Server-managed integrity mirror of default_value for a reference datatype: the referenced target record id as a real FK to record.id with ondelete=RESTRICT. Derived from default_value in before_create_cb/before_update_cb; NULL for non-reference datatypes or when no default is set. Any client-supplied value is overwritten from default_value. |
| default_value | Union | The default value applied to this attribute when a custom object is created without an explicit value for it. JSON-encoded per the attribute datatype (same shape as a custom-object value). NULL means no explicit default: an absent value then stays NULL (nullable attribute) or is rejected (is_nullable=false). For reference datatypes it holds the target record id (mirrored to default_reference_id). |
| description | Union | A description of attribute. |
| init | Optional | |
| is_hidden | Union | A flag to control if attribute should be hidden in the "more" section of the form. |
| is_nullable | Union | A flag to control if the attribute can be NULL. |
| is_unique | Union | A flag to control if attribute values must be unique. |
| name | Union | The name of the attribute. |
| object_template_id | Union | Reference to the object_template this object_template_attribute is associated with. |
| reference_object_template_id | Union | The object template the attribute is referencing. Only valid when datatype is OBJECT_TEMPLATE_REFERENCE. |
| reference_record_type | Union | The record type the attribute is referencing. Only valid when datatype is RECORD_REFERENCE. |
| searchable | Union | A flag to control if this attribute's value is included in the full-text search index of its custom objects. |
| select | Optional | |
| silent_update | Union | A flag to control if a change to this attribute should trigger the on-update provisioning execution. |
| sort_order | Union | Curated display/edit order of the attribute within its object template. The attribute list and the custom-object value schema (form field order) sort by this ascending, with name as a deterministic tiebreak. A newly-created attribute is appended at the end (max+1); set explicitly to re-order. |