Skip to main content
Version: 12 - TBD

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

NameTypeDescription
allow_deletedbool
allow_normalbool
allowed_valuesUnionThe 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.
bystr
clsOptional
commitbool
datatypeUnionThe datatype of the attribute.
debugboolif set, the content of the data being written will be logged.
default_reference_idUnionServer-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_valueUnionThe 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).
descriptionUnionA description of attribute.
initOptional
is_hiddenUnionA flag to control if attribute should be hidden in the "more" section of the form.
is_nullableUnionA flag to control if the attribute can be NULL.
is_uniqueUnionA flag to control if attribute values must be unique.
nameUnionThe name of the attribute.
object_template_idUnionReference to the object_template this object_template_attribute is associated with.
reference_object_template_idUnionThe object template the attribute is referencing. Only valid when datatype is OBJECT_TEMPLATE_REFERENCE.
reference_record_typeUnionThe record type the attribute is referencing. Only valid when datatype is RECORD_REFERENCE.
searchableUnionA flag to control if this attribute's value is included in the full-text search index of its custom objects.
selectOptional
silent_updateUnionA flag to control if a change to this attribute should trigger the on-update provisioning execution.
sort_orderUnionCurated 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.

Constants

RESOURCE = object_template_attribute

Methods

clone

default_reference_id_record

delete

duplicate

exists

export

get

get_dict

object_template

reference_object_template_id_object_template

restore

save