Creating Tablefields

A tablefield is somewhat special. It's a field of a table formfield (can you still follow ?).
A form can have the table formfield. That table has its own fields, called a tablefield.

Formfields Expressions

Search

Type Description
text

A text input field

textarea

A textarea input field

number

A number input field

password

A password masked input field

checkbox

A checkbox field

datetime

A datetime field

enum

A multi-column filterable dropdown box

text formfield

A text input field
Below are the properties that are specifically for a text tablefield

Attribute Comments
basic
label
string

Tablefield label
Free text

A friendly name/label for the tablefield

name
string / required / unique

Field name
Alfanumeric + underscore + dash

This attribute represents the name of the form field.

placeholder
string

In-field help value
Free text

Some form fields allow an in-field hint value.

Only available with types:
text, textarea, number, password, checkbox, enum, datetime

type
string / required

Tablefield type (= text)

data
default
many

Default value

The type of the value depends on the field type.
Can be string,boolean, number, array or object. When using an enum field, you can use the following special values : * __auto__ : select the first * __none__ : select none * __all__ : select all (if multiple is true)

Only available with types:
text, textarea, number, password, enum, checkbox, datetime

validation
in
object
added in version 2.2.4

A list validation (must be in list)

Enforces a validation where the current field must be one of the values in a list (referencing another field). This field requires an object with 2 attributes: * field : The name of the field that holds the list * description : A validation message to show when the validation is not met. (new in v5.0.1 : can have placeholder)

Only available with types:
text, expression, password, datetime

Examples:

1) Check if ip is in range

in:
  field: range_of_ips   # range_of_ips is an other expression array field
  description: This ip must be in the specified range              

maxLength
number

Field maximum length
Integer > 0

Forces a string-field to be maximum x long.

Only available with types:
text, expression, password

minLength
number

Field minimum length
Integer > 0

Forces a string-field to be at least x long.

Only available with types:
text, expression, password

notIn
object
added in version 2.2.4

A list validation (can not be in list)

Enforces a validation where the current field can not be one of the values in a list (referencing another field). This field requires an object with 2 attributes: * field : The name of the field that holds the list * description : A validation message to show when the validation is not met. (new in v5.0.1 : can have placeholder)

Only available with types:
text, expression, password, datetime

Examples:

1) Check if ip exists

notIn:
  field: list_of_ips  # list_of_ips is an other expression array field
  description: This ip already exists            

regex
object

A regular expression validation

Enforces a validation where the current field must match a regular expression. This field requires an object with 2 attributes: * expression : The regular expression * description : A validation message to show when the regex is not matched.

Only available with types:
text, expression, password, datetime

Examples:

1) Validate email address

regex:
  expression: "[a-z0-9]+@[a-z]+\.[a-z]{2,3}"
  description: Please type a valid email address

2) Strong password

regex:
  expression: "(?=^.{8,}$)(?=.*\d)(?=.*[!@#$%^&*]+)(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$"
  description: Must be complex (8 or longer ; uppercase ; lowercase ; numeric ; specials)              

required
boolean

Required field

Makes the field required.

Default:
false
visualization
icon
string

Field icon
Free fontawesome 6 icon

Some tablefields can hold a nice looking icon. The icon name is a free fontawesome 6 icon. You can find more information at www.fontawesome.com

Only available with types:
text, number, password, enum, datetime

textarea formfield

A textarea input field
Below are the properties that are specifically for a textarea tablefield

Attribute Comments
basic
label
string

Tablefield label
Free text

A friendly name/label for the tablefield

name
string / required / unique

Field name
Alfanumeric + underscore + dash

This attribute represents the name of the form field.

placeholder
string

In-field help value
Free text

Some form fields allow an in-field hint value.

Only available with types:
text, textarea, number, password, checkbox, enum, datetime

type
string / required

Tablefield type (= textarea)

data
default
many

Default value

The type of the value depends on the field type.
Can be string,boolean, number, array or object. When using an enum field, you can use the following special values : * __auto__ : select the first * __none__ : select none * __all__ : select all (if multiple is true)

Only available with types:
text, textarea, number, password, enum, checkbox, datetime

validation
required
boolean

Required field

Makes the field required.

Default:
false

number formfield

A number input field
Below are the properties that are specifically for a number tablefield

Attribute Comments
basic
label
string

Tablefield label
Free text

A friendly name/label for the tablefield

name
string / required / unique

Field name
Alfanumeric + underscore + dash

This attribute represents the name of the form field.

placeholder
string

In-field help value
Free text

Some form fields allow an in-field hint value.

Only available with types:
text, textarea, number, password, checkbox, enum, datetime

type
string / required

Tablefield type (= number)

data
default
many

Default value

The type of the value depends on the field type.
Can be string,boolean, number, array or object. When using an enum field, you can use the following special values : * __auto__ : select the first * __none__ : select none * __all__ : select all (if multiple is true)

Only available with types:
text, textarea, number, password, enum, checkbox, datetime

validation
maxValue
number

Field maximum value
Integer

Forces a number-field to not be higher than…

Only available with types:
number

minValue
number

Field minimum value
Integer

Forces a number-field to not be lower than…

Only available with types:
number

required
boolean

Required field

Makes the field required.

Default:
false
visualization
icon
string

Field icon
Free fontawesome 6 icon

Some tablefields can hold a nice looking icon. The icon name is a free fontawesome 6 icon. You can find more information at www.fontawesome.com

Only available with types:
text, number, password, enum, datetime

password formfield

A password masked input field
Below are the properties that are specifically for a password tablefield

Attribute Comments
basic
label
string

Tablefield label
Free text

A friendly name/label for the tablefield

name
string / required / unique

Field name
Alfanumeric + underscore + dash

This attribute represents the name of the form field.

placeholder
string

In-field help value
Free text

Some form fields allow an in-field hint value.

Only available with types:
text, textarea, number, password, checkbox, enum, datetime

type
string / required

Tablefield type (= password)

data
default
many

Default value

The type of the value depends on the field type.
Can be string,boolean, number, array or object. When using an enum field, you can use the following special values : * __auto__ : select the first * __none__ : select none * __all__ : select all (if multiple is true)

Only available with types:
text, textarea, number, password, enum, checkbox, datetime

validation
in
object
added in version 2.2.4

A list validation (must be in list)

Enforces a validation where the current field must be one of the values in a list (referencing another field). This field requires an object with 2 attributes: * field : The name of the field that holds the list * description : A validation message to show when the validation is not met. (new in v5.0.1 : can have placeholder)

Only available with types:
text, expression, password, datetime

Examples:

1) Check if ip is in range

in:
  field: range_of_ips   # range_of_ips is an other expression array field
  description: This ip must be in the specified range              

maxLength
number

Field maximum length
Integer > 0

Forces a string-field to be maximum x long.

Only available with types:
text, expression, password

minLength
number

Field minimum length
Integer > 0

Forces a string-field to be at least x long.

Only available with types:
text, expression, password

notIn
object
added in version 2.2.4

A list validation (can not be in list)

Enforces a validation where the current field can not be one of the values in a list (referencing another field). This field requires an object with 2 attributes: * field : The name of the field that holds the list * description : A validation message to show when the validation is not met. (new in v5.0.1 : can have placeholder)

Only available with types:
text, expression, password, datetime

Examples:

1) Check if ip exists

notIn:
  field: list_of_ips  # list_of_ips is an other expression array field
  description: This ip already exists            

regex
object

A regular expression validation

Enforces a validation where the current field must match a regular expression. This field requires an object with 2 attributes: * expression : The regular expression * description : A validation message to show when the regex is not matched.

Only available with types:
text, expression, password, datetime

Examples:

1) Validate email address

regex:
  expression: "[a-z0-9]+@[a-z]+\.[a-z]{2,3}"
  description: Please type a valid email address

2) Strong password

regex:
  expression: "(?=^.{8,}$)(?=.*\d)(?=.*[!@#$%^&*]+)(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$"
  description: Must be complex (8 or longer ; uppercase ; lowercase ; numeric ; specials)              

required
boolean

Required field

Makes the field required.

Default:
false
visualization
icon
string

Field icon
Free fontawesome 6 icon

Some tablefields can hold a nice looking icon. The icon name is a free fontawesome 6 icon. You can find more information at www.fontawesome.com

Only available with types:
text, number, password, enum, datetime

checkbox formfield

A checkbox field
Below are the properties that are specifically for a checkbox tablefield

Attribute Comments
basic
label
string

Tablefield label
Free text

A friendly name/label for the tablefield

name
string / required / unique

Field name
Alfanumeric + underscore + dash

This attribute represents the name of the form field.

placeholder
string

In-field help value
Free text

Some form fields allow an in-field hint value.

Only available with types:
text, textarea, number, password, checkbox, enum, datetime

type
string / required

Tablefield type (= checkbox)

data
default
many

Default value

The type of the value depends on the field type.
Can be string,boolean, number, array or object. When using an enum field, you can use the following special values : * __auto__ : select the first * __none__ : select none * __all__ : select all (if multiple is true)

Only available with types:
text, textarea, number, password, enum, checkbox, datetime

validation
required
boolean

Required field

Makes the field required.

Default:
false

datetime formfield

A datetime field
Below are the properties that are specifically for a datetime tablefield

Attribute Comments
basic
label
string

Tablefield label
Free text

A friendly name/label for the tablefield

name
string / required / unique

Field name
Alfanumeric + underscore + dash

This attribute represents the name of the form field.

placeholder
string

In-field help value
Free text

Some form fields allow an in-field hint value.

Only available with types:
text, textarea, number, password, checkbox, enum, datetime

type
string / required

Tablefield type (= datetime)

data
default
many

Default value

The type of the value depends on the field type.
Can be string,boolean, number, array or object. When using an enum field, you can use the following special values : * __auto__ : select the first * __none__ : select none * __all__ : select all (if multiple is true)

Only available with types:
text, textarea, number, password, enum, checkbox, datetime

datetime
dateType
string
added in version 4.0.2

DateType of the datetime picker

The datetime picker can pick several types

Choices:
  • date
  • datetime
  • time
  • month
  • year
Only available with types:
datetime

validation
in
object
added in version 2.2.4

A list validation (must be in list)

Enforces a validation where the current field must be one of the values in a list (referencing another field). This field requires an object with 2 attributes: * field : The name of the field that holds the list * description : A validation message to show when the validation is not met. (new in v5.0.1 : can have placeholder)

Only available with types:
text, expression, password, datetime

Examples:

1) Check if ip is in range

in:
  field: range_of_ips   # range_of_ips is an other expression array field
  description: This ip must be in the specified range              

notIn
object
added in version 2.2.4

A list validation (can not be in list)

Enforces a validation where the current field can not be one of the values in a list (referencing another field). This field requires an object with 2 attributes: * field : The name of the field that holds the list * description : A validation message to show when the validation is not met. (new in v5.0.1 : can have placeholder)

Only available with types:
text, expression, password, datetime

Examples:

1) Check if ip exists

notIn:
  field: list_of_ips  # list_of_ips is an other expression array field
  description: This ip already exists            

regex
object

A regular expression validation

Enforces a validation where the current field must match a regular expression. This field requires an object with 2 attributes: * expression : The regular expression * description : A validation message to show when the regex is not matched.

Only available with types:
text, expression, password, datetime

Examples:

1) Validate email address

regex:
  expression: "[a-z0-9]+@[a-z]+\.[a-z]{2,3}"
  description: Please type a valid email address

2) Strong password

regex:
  expression: "(?=^.{8,}$)(?=.*\d)(?=.*[!@#$%^&*]+)(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$"
  description: Must be complex (8 or longer ; uppercase ; lowercase ; numeric ; specials)              

required
boolean

Required field

Makes the field required.

Default:
false
visualization
icon
string

Field icon
Free fontawesome 6 icon

Some tablefields can hold a nice looking icon. The icon name is a free fontawesome 6 icon. You can find more information at www.fontawesome.com

Only available with types:
text, number, password, enum, datetime

enum formfield

A multi-column filterable dropdown box
Below are the properties that are specifically for a enum tablefield

Attribute Comments
basic
label
string

Tablefield label
Free text

A friendly name/label for the tablefield

name
string / required / unique

Field name
Alfanumeric + underscore + dash

This attribute represents the name of the form field.

placeholder
string

In-field help value
Free text

Some form fields allow an in-field hint value.

Only available with types:
text, textarea, number, password, checkbox, enum, datetime

type
string / required

Tablefield type (= enum)

data
default
many

Default value

The type of the value depends on the field type.
Can be string,boolean, number, array or object. When using an enum field, you can use the following special values : * __auto__ : select the first * __none__ : select none * __all__ : select all (if multiple is true)

Only available with types:
text, textarea, number, password, enum, checkbox, datetime

from
string

Datasource
expression reference

In a table we can have an enum field. The source of the data for this enum field must come from the main form.
So this from field points to the expression field that holds the query data.

Only available with types:
enum

outputObject
boolean

Output the selection of an enum field as a full object.

When selecting from an enum field (dropdown), either the first column or
the column defined in valueColumn is sent as an extravar.
If you want the full selected record, use the property.

new in v4.0.20 : you can also use valueColumn: “*” to export all columns

Default:
false
Only available with types:
enum

valueColumn
string

The column of a selected item that needs to exported as extravar

When you select an item in an enum field, by default the first column is used to send as extravar.
By setting this property, you can change it to another field.
This setting is ignored when outputObject is true.

new in v4.0.20 : setting value “*” will export all columns.

Default:
first column
Only available with types:
enum

Examples:

1) Export name

- name: users
  type: enum
  dbConfig:
    name: CMDB
    type: mysql
  query: SELECT name, username FROM users
  columns:
  - name
  valueColumn: username

interaction
filterColumns
array

The list of columns that you can filter on

By default the previewColumn or first visible column is used to filter on.
With this property you can filter on the columns you want.

Only available with types:
enum

Examples:

1) Show usage

- name: volumes
  type: enum
  dbConfig:
    name: CMDB
    type: mysql
  query: SELECT id, name, title FROM volumes
  columns:
  - name
  - title
  filterColumns:
  - name
  - title  

validation
required
boolean

Required field

Makes the field required.

Default:
false
visualization
columns
array

The list of columns visible in the dropdown box

By default all properties are show in an enum field. With this property you can choose which are visible.

Only available with types:
enum

Examples:

1) Show only wanted columns

- name: users
  type: enum
  dbConfig:
    name: CMDB
    type: mysql
  query: SELECT id, name, username, zip, city FROM users
  columns:
  - name
  - username

horizontal
boolean
added in version 4.0.3

Converts a dropdown box to a horizontal selector

A enum field is by default a dropdown box. However, you can change that behavior by setting this property.
The unselected values are on the left and the selected values on the right. This works in combiniation with sticky.
PctColumns are disabled, due to the space it consumes horizontally.

Default:
false
Only available with types:
enum

icon
string

Field icon
Free fontawesome 6 icon

Some tablefields can hold a nice looking icon. The icon name is a free fontawesome 6 icon. You can find more information at www.fontawesome.com

Only available with types:
text, number, password, enum, datetime

pctColumns
array

The list of columns that should visualized as a percentage-bar

By default all properties are show with its regular value.
With a percentage it can be nice to visualize it as a graphical bar.
The assumption is that the value is an integer between 0 and 100.

Only available with types:
enum

Examples:

1) Show usage

- name: volumes
  type: enum
  dbConfig:
    name: CMDB
    type: mysql
  query: SELECT id, name, used, total, (used/total*100) as used_pct FROM volumes
  columns:
  - name
  - used_pct
  pctColumns:
  - used_pct

previewColumn
string

The column of the selected item(s) that is shown in the dropdown-preview

When you select an item in an enum field, by default the first column is used as a preview.
By setting this property you change the column to be used.

Default:
first column
Only available with types:
enum

Examples:

1) Export name

- name: user
  type: enum
  dbConfig:
    name: CMDB
    type: mysql
  query: SELECT id,name FROM users
  previewColumn: name

sticky
boolean

Make a dropdown box permanently visible

A enum field is by default a dropdown box. However, you can change that behavior by setting this property.
The dropbox looses it reactivity and becomes a fixed table.

Default:
false
Only available with types:
enum