Sf chaintable

From ARK
Revision as of 12:41, 13 October 2015 by Mike (talk | contribs) (Description)

Jump to: navigation, search


sf_chaintable can be used for displaying and editing data fragments that are chained to other data fragments. One 'root' field is linked to the item being viewed, which may have one or more fragments per item creating rows for the table and then one or more fragments can be chained to these to create additional columns. Examples of this include attaching numbers to find attributes - mirroring and supplements sf_assemblage for linking usage to periods of sites, or for levels tables.

By default the chaintable hides any empty columns. As of version 1.2 the new records feature is incomplete and only some of the edit functions are supported - numbers, text and attributes.

Additional Fields

The sf_assemblage needs a number of different 'op' variables set in the sf_conf:

  • op_assemblage_type - the root field which is connected to the item
  • op_sum_field - if this is set then the rows will be aggregated where they are identical and the number in this field will be summed for the output. this field must be a number!
  • fields - the columns that will be added to the table

Example Configuration

$conf_mcd_assemblage =
        'view_state' => 'max',
        'edit_state' => 'view',
        'sf_title' => 'assemblage', //appears in the titlebar of the subform (mk nname)
        'sf_html_id' => 'pottery_ass', //the form id tag (must be unique)
        'sf_nav_type' => 'nmedit',
        'script' => 'php/subforms/sf_chaintable.php',
        'op_assemblage_type' =>  $conf_field_total,// the field of data attached to the item
        'op_sum_field' => $conf_field_total,
        'default' => '0', //the default value for creating new records
        'op_label' => 'space',
        'op_input' => 'save',
        'fields' => array(