=================
Item Group Editor
=================

**Item Group Editor** opens when a developer wants to create a new item group or 
modify an existing one. See 
:doc:`Task tree </programming/task_tree>`

The upper part of the **Item Group Editor** have the following fields:

* **Caption** - the group name that appears to users.

* **Name** - the name of the group that will be used in programming code to 
  get access to the group object. It should be unique in the project and should 
  be a valid python identifier.

* **Visible** - use this checkbox to set group's visible attribute. The value of 
  this attribute can be used in code on the client to create menu items and so 
  on.

* **Primary key field** - by clicking on the button to the right of this 
  attribute you can specify the common primary key field for items that the group 
  will own. You have to create this field first, see below
  
* **Deleted flag field** - by clicking on the button to the right of this 
  attribute you can specify the common field that will serve as a deleted flag 
  for items that the group will own. You have to create this field first, see below 
  
In the center part of the **Item Group Editor** dialog there is a table 
containing a list of fields, defined for the item. Thsese fields are 
:doc:`common </programming/data/common_fields>`
to all items the group will own. 

To add, modify or delete a field use the following buttons:

* **New** - click the button to invoke the 
  :doc:`Field Editor Dialog </admin/items/field_editor_dialog>`
  to create a new field.

* **Edit** - click the button to invoke the 
  :doc:`Field Editor Dialog </admin/items/field_editor_dialog>`
  to modify a selected field.

* **Delete** - click the button to delete a field selected in in the field list.

In the bottom-right corner of the Dialog form there are two buttons:

* **OK** - click the button to save change you made. 

* **Cancel** - click the buttons to cancel the operation.

.. note::
    You can create new or modify existing fields and set **Primary key field** 
    and **Deleted flag field** attributes only when creating a new group or 
    editing an empty one.
    
    For existing item groups, that already own items you can only change 
    **Caption**, **Name** and  **Visible** attributes.

.. image:: /admin/_images/item_group.png
	:align: center
	:alt: Item Group Editor

