Skip to content
This repository has been archived by the owner on Sep 30, 2019. It is now read-only.

Latest commit

 

History

History
164 lines (106 loc) · 9.02 KB

model.md

File metadata and controls

164 lines (106 loc) · 9.02 KB

Model

Struct

This is the primary object...

Field Type Required Notes
name keyword true The common name used to identify the type of structure
label string or Label true Describes the struct in the UI
collectionLabel string or Label true Describes a collection of the struct in the UI
fields Field[] true
blocks Block[] true Array of Blocks

Field

The property level portions of a Struct

Field Type Required Missing Val Notes
name keyword true N/A The common name used to describe identify the field
label string or Label true N/A Describes the field in the UI
type string true N/A Identifies the Type of the field
keyField boolean false false Indicates that the field is used as the key or part of a composite key to identify a specific instance of a struct
required boolean false false Indicates that the field is required in order to be saved
unique boolean false false The field value must be unique across all instances of the same struct
initialValue value consistent with the field type false The value used when an instance of the struct is created
missingValue value consistent with the field type false The value to be used if a value for the struct has not been set
placeholder string false A string to display in the UI when no value is defined
hints Hint false Display recomendation to the UI

Additional properties for fields of type text

Field Type Required Missing Val Notes
maxlength integer false The longest allowed length of the value
minlength integer false The shortest allowed length of the value

Additional properties for fields of type integer

Field Type Required Missing Val Notes
max integer false The maxiumum allowed value
min integer false The minimum allowed value

Additional properties for fields of type list

Field Type Required Missing Val Notes
options option[] true N/A An array of values options

Additional properties for fields of type foreignKey

Field Type Required Missing Val Notes
reference reference true N/A A reference to the child struct

Additional properties for fields of type linkedStruct

Field Type Required Missing Val Notes
reference reference true N/A A reference to the other struct

Additional properties for fields of type derived

Field Type Required Missing Val Notes
pattern text true N/A A pattern describing how a value is derived from other fields

Type

Type Description
text
keyword A string with no whitespace characters
integer
estimate The approximation of an decimal value
date
boolean
percent
money
foreignKey Indicates a parent relationship of another struct
linkedStruct Indicates a relationship to another struct
list A preset list of possible values
derived A value derived from the values of other fields

Block

A grouping of fields displayed in the UI

Field Type Required Notes
name keyword true The common name used to identify the block
label string or Label false Describes the block in the UI
condition condition false condition evaluated to determine if the block should be displayed
fields Array of Strings and/or Conditional Field References true Array of fieldname and Conditional Field References included in the block in display order
hints hint false Display recomendation to the UI

Label

Describes how to label a struct, field, or block. The object must contain as least one of the following.

Field Data Type Required Notes
short string false The short length label
medium string false The medium length label
long string false The long length label

Reference

Describes a relationship to another struct

Field Type Required Missing Val Notes
name keyword true N/A The name of the other struct
labelField string true N/A The name of the field whose value will identify the other struct instance.

Hint

Recommendations given to the UI about how to display the form element. Applies to fields and structs

Field Type Required Missing Val Notes
width integer false The recommended width of a field or block

Option

Field Type Required Notes
label string or Label true The display value for the option in the UI
value value cosistent with the field type true the value associated with the option

Conditional Field Reference

References a Field and defines a condition to be evaluated to determine if the field should be displayed.

Field Type Required Notes
field string true The name of the field to display
condition condition true expression to be evaluated to determine if field should be displayed

Condition

An expression that if evaluated as truthy or falsy.