attribute::value_add (public)
attribute::value_add attribute_id enum_value sort_order
Defined in packages/acs-subsite/tcl/attribute-procs.tcl
adds the specified enumeration value to the attribute.
- Parameters:
- attribute_id (required)
- The attribute to which we are adding
- enum_value (required)
- The value which we are adding to the enum
- sort_order (required)
- Author:
- Ben Adida <ben@openforce.net>
- Created:
- 08/2001
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- acs_subsite_attributes
Source code: # Just insert it if we can db_dml insert_enum_value { insert into acs_enum_values (attribute_id, sort_order, enum_value, pretty_name) select :attribute_id, :sort_order, :enum_value, :enum_value from dual where not exists (select 1 from acs_enum_values v2 where v2.pretty_name = :enum_value and v2.attribute_id = :attribute_id) }Generic XQL file: packages/acs-subsite/tcl/attribute-procs.xql
PostgreSQL XQL file: packages/acs-subsite/tcl/attribute-procs-postgresql.xql
Oracle XQL file: packages/acs-subsite/tcl/attribute-procs-oracle.xql