Nested metadata structures
หมายเหตุ: บทความนี้ยังเป็นภาษาอังกฤษ เนื่องจากคำแปลภาษาไทยกำลังอยู่ระหว่างจัดทำ
Purpose
หัวข้อที่มีชื่อว่า “Purpose”Define reusable nested objects used inside Table, Form, Menu, Report, View, Chart, and Extension Artifacts.
Most nested schemas reject unlisted properties; use only the properties documented here. “Required” refers to the nested object itself; the parent collection may still be optional.
Table field
หัวข้อที่มีชื่อว่า “Table field”Required: name, type.
| Property | Type | Meaning |
|---|---|---|
name |
identifier | Field name; cannot be id, createdAt, createdBy, modifiedAt, or modifiedBy. |
type |
enum | string, int, real, boolean, date, datetime, enum, or reference. |
label |
string | User-facing label. |
mandatory |
boolean | Required business value. Enum and read-only fields cannot be mandatory. |
readOnly |
boolean | Generated Forms and REST writes cannot edit it; trusted code may. |
allowEdit |
boolean | Allow edit after creation. |
allowEditOnCreate |
boolean | Allow edit during creation. |
maxLength |
integer ≥ 1 | String length limit. |
enumName |
identifier | Required semantically when type is enum; must reference an existing Enum. |
reference |
object | Required semantically when type is reference. |
default |
scalar or null | String, number, boolean, or null. |
{ "name": "customerId", "type": "reference", "label": "Customer", "mandatory": true, "reference": { "table": "SALES_Customer", "displayFields": ["accountNo", "name"], "onDelete": "restrict" }}Reference settings
หัวข้อที่มีชื่อว่า “Reference settings”Required: table.
displayFieldselects one display field;displayFieldsselects one or more and takes the practical multi-field form.onDeleteisrestrict,cascade, orsetNull. A mandatory reference cannot usesetNull.copyFieldscontains{ "from": "sourceField", "to": "localField" }.frommust exist on the referenced table;tomust be a different local field.filterscontainsfield,operator, andvalue. Operators areeq,ne,gt,gte,lt,lte, andcontains.- A filter value may be a literal/null,
{ "source": "record", "field": "localField" }, or{ "source": "lookup", "field": "localReference", "lookupField": "fieldOnItsTarget" }.
Required: name, non-empty fields. Optional: unique.
Every indexed field must exist on the effective Table.
{ "name": "SALES_Order_OrderNoIdx", "fields": ["orderNo"], "unique": true }Form group
หัวข้อที่มีชื่อว่า “Form group”Required: fields. Optional: id, label, hidden, order.
All fields must exist on the Form’s Table. Give id a stable value when an Extension may override the group.
Form action
หัวข้อที่มีชื่อว่า “Form action”Required: label and a semantic target.
| Property | Meaning |
|---|---|
id, hidden, order |
Stable presentation identity and state. |
type |
function, report, or picker; defaults to function. |
target |
Required function/report name. For a picker, still provide a stable target name used by the action. |
action |
Legacy function target; new metadata uses type + target. |
privilege |
Optional named Privilege for the action. |
showOnCreate |
Show before the record has an ID. |
picker |
Required when type is picker. |
A picker requires table and non-empty columns. It may include searchFields, multiple, allocation { availableField, quantityLabel? }, and filters. Picker filter values may be literals/null or { "source": "record" | "line", "field": "..." }; line is valid only on a line action.
Form Line grid
หัวข้อที่มีชื่อว่า “Form Line grid”Required: table, refField, fields. Optional: id, label, hidden, order, aggregates, actions.
refField is the child Table field pointing to the parent record. Do not include refField as an editable Line column. Aggregates are:
[ { "fn": "count", "label": "Lines" }, { "fn": "sum", "field": "amount", "label": "Total" }, { "fn": "avg", "field": "quantity", "label": "Average" }]sum and avg require an int or real field. count does not require field.
Embedded Form Chart
หัวข้อที่มีชื่อว่า “Embedded Form Chart”Required: chart. Optional: id, label, hidden, order, width, parameterBindings.
width is half or full. Each binding requires parameter and source:
source: "record"requiresfieldwith a compatible type.source: "literal"requiresvalue(string, number, boolean, or null).- Every required View parameter must be bound exactly once.
Menu item
หัวข้อที่มีชื่อว่า “Menu item”All properties are structurally optional, but a useful leaf needs a label and target. Prefer:
{ "id": "sales-orders", "label": "Sales orders", "icon": "grid", "visible": true, "order": 10, "target": { "type": "form", "name": "SALES_OrderForm" }}Targets are { "type": "group" } or { "type": "form" | "function" | "report", "name": "..." }. form, route, and action are legacy-compatible shortcuts. items contains nested menu items. In Menu Extensions, parentId attaches a new item under an inherited group. Allowed icons are app, grid, users, settings, database, table, chart, shield, wrench, and file.
Use visible; hidden remains compatible, and visible wins when both are present.
Security permission structures
หัวข้อที่มีชื่อว่า “Security permission structures”Table permission requires table; optional booleans are read, create, update, and delete. Referenced Tables, Forms, Functions, Reports, Views, Privileges, Duties, and Roles must exist in the candidate workspace.
Report page, bands, and elements
หัวข้อที่มีชื่อว่า “Report page, bands, and elements”Page settings:
{ "size": "A4", "orientation": "portrait", "margins": [40, 40, 40, 40]}The schema accepts a four-number tuple. Runtime type documentation defines the order as [top, right, bottom, left] in points.
A band requires kind, height, and elements:
kind:header,detail, orfooter;pageHeader/pageFooterare legacy-compatible.displayOn:firstPage,everyPage, orlastPage, only for Header/Footer.layout:freeformortablix.- A Tablix is valid only on a Detail band, requires
tablix, and requireselements: [].
A freeform element requires id, type, x, y, width, and height. type is text, field, image, line, or rect; provide text for text and field for bound fields. Optional format and style properties are fontSize, bold, italic, fontFamily, align, color, and borderWidth.
A Tablix requires at least one column. Each column requires field; optional properties are label, positive width, align, and format. Optional Tablix properties are positive headerHeight, positive rowHeight, headerStyle, rowStyle, and border.
Line sources require table, refField, and bands. Parameters require field; optional operator is eq, from, or to, with optional label and required.
View structures
หัวข้อที่มีชื่อว่า “View structures”Source requires table and alias. A Join requires type (inner or left), table, unique alias, and non-empty on conditions containing left and right references in alias.field form.
A View column requires name and expression:
{ "name": "customerName", "expression": { "type": "field", "ref": "c.name" } }{ "name": "totalAmount", "expression": { "type": "aggregate", "fn": "sum", "ref": "o.amount" } }Aggregates are count, sum, avg, min, and max. Only count may omit ref; sum/avg require numeric fields. If any output is aggregated, every non-aggregate field expression must appear in groupBy.
A View parameter requires name and type (string, int, real, boolean, date, or datetime); required is optional. A filter requires ref, operator, and value. Operators add in to the normal comparison set. value is a literal/null, literal array, or { "parameter": "name" }. contains requires a string field; in requires an array or parameter.
orderBy items require an output column; direction is asc or desc.
Chart measure
หัวข้อที่มีชื่อว่า “Chart measure”Required: field. Optional: label, color. field must be an output column of the Chart’s View.
Extension overrides
หัวข้อที่มีชื่อว่า “Extension overrides”fieldOverrides:fieldplus optionallabel,readOnly,allowEdit,allowEditOnCreate.elementOverrides:targetIdplus optionallabel,hidden,order.lineOverrides:targetIdplus optionallabel,hidden,order,fields,aggregates,actions. It cannot change the inherited relationship identity (table/refField).itemOverrides:targetIdplus optionallabel, icon, visibility, order, or target.valueOverrides:nameand required replacementlabel.columnOverrides:columnand required replacementlabel.measureOverrides:fieldplus optionallabelandcolor.
Related topics
หัวข้อที่มีชื่อว่า “Related topics”Artifact API · Artifact kinds · Forms · Reports · Views and Charts