Subrecord Table

📌 Handle your subrecord line items.

Overview

The subrecord-table tile allows you to handle Subrecord line items easily. It allows you to add, edit and view the Subrecord line items.

Object Properties

The table provides a summary of the object properties associated with the sub-record table tile type, including their types, mandatory or optional status, and descriptions.

FieldType

Mandatory/

Optional

Description
typestringMandatoryAlways set to subrecord-table.
titlestringOptionalIf omitted, the Subrecord's name will be used. Use a string for the tile’s title; set it to false to hide the title.
recordstringMandatorySpecifies the internal ID of the Subrecord (e.g. line-items)
contentarrayMandatoryAn array of objects describing subrecord table columns.
subtotalsarrayOptionalAn array of objects for calculating subtotals that are displayed below the subrecord table.

Explanation of Object Properties:

  1. Content

The content array which is utilised to describe the columns of the subrecord table.

The example displays the configuration for the most basic column, but we have the alternative to introduce additional settings for modifying different elements of the subrecord table.

{
 "type": "field",
 "field": "task"
}
  1. Content object (column)

The table provides an insight into the various object properties of the content objects within the column of a subrecord table:

FieldTypeRequirementDescription
typestringMandatoryAlways set to field.
fieldstringMandatoryThe internal ID of the subrecord’s field to be utilised in the column.
labelstringOptionalThe label for display.
widthnumberOptionalColumn width in pixels defaults to 200 and is adjusted based on the field type.
minWidthnumberOptionalThe minimum column resize width in pixels defaults to 150 and is adjusted based on field type.
optionsobjectOptionalAdditional options for the content objects within the column.
readonlybooleanOptionalIf true, the field is displayed without input, showing only the value; the value can be changed by utilising the rules, etc.
mandatorybooleanOptionalSpecifies the default mandatory state for the field; if present (as true or false) will take precedence against field’s mandatory setting.
noValueTextstringOptionalText displayed when the field's value is blank; If omitted, it defaults to No LABEL (e.g. No due date for a field with the label “Due date”).
placeholderstringOptionalDesignated placeholder for the input field. If set, it takes precedence over the field’s placeholder. If it is omitted, the field’s placeholder is used.
errorTextstringOptionalText displayed when the field has an error (e.g. mandatory and blank after form submission).
disableAddbooleanOptionalIf set to true, it hides the + button for the selects field.
  1. Subtotals

Subtotals is an array of objects used for calculating subtotals and is displayed beneath the subrecord table. They simplify understanding and analysis of the subtotals content within the subrecord table. The table provides an insight into the various object properties of the subtotals:

FieldTypeRequirementDescription
labelstringMandatoryThe label displayed before the calculated number.
fieldstringMandatorySpecifies the internal ID of the field to sum.
iconstringOptionalIndicates the fontawesome icon (e.g. fa-solid fa-circle) present in front of the label.

Example:
The example demonstrates the syntax for subtotals in Subrecord table:

{
 ...
 "subtotals": [
     {
         "label":"Tax total",
         "icon":"fa fa-scale-unbalanced-flip",
         "field":"tax-amount"
 },
 {
         "label":"Total amount",
         "field":"amount"
      }
   ]
}

Sample Configuration

Here is a sample configuration for incorporation of thesubrecord table:

{
    "type": "subrecord-table",
    "record": "kalysys-dependencies",
    "content": [
        {
            "type": "field",
            "field": "task"
        },
        {
            "type": "field",
            "field": "type"
        },
        {
            "type": "field",
            "field": "offset",
            "options": {
                    "mandatory": true
             }
        },
        {
            "type": "field",
            "field": "date"
        },
        {
            "type": "field",
            "field": "time",
            "options": {
                     "readonly": true
             }
        },
        {
             "type": "field",
             "field": "datetime"
        }
    ]
}  

📌 Need Help?

If you require assistance or encounter any issues, please don't hesitate to contact us for further support.