table.yml

Table File

The table YAML file define one table that belongs to an app.

type

object

properties

  • key

The table key should be unique in the app. Should start with a letter, and allow only letters and numbers.

Identifier

  • type

Must be table

type

string

enum

table

default

table

  • name

Name of the table in plural. E.g. Candidates

type

string

  • itemName

Name of an item (singular). E.g. Candidate

type

string

  • summary

Title and subtitle of an item. It will be displayed when an item from this table should be selected from another table. Both title and subtitle can contain references to fields, surrounding them in double braces.

type

object

properties

  • title

First line (title) of the item.

type

string

examples

This is a simple title

You can include fields: {{firstName}}

You can include variables: {{_vars.initiator.firstName}}

  • subtitle

Second line (subtitle) of the item.

type

string

examples

This is a simple subtitle

You can include fields: {{firstName}}

You can include variables: {{_vars.initiator.firstName}}

additionalProperties

False

  • fields

Describes the fields of this table

type

object

patternProperties

Field

  • form

Optional. Describes this table’s form. If not set, it will show all the fields.

form

  • stages

Describe the stages that an item can go through

stages

  • initialStage

Indicates which of the stages should be considered by default when creating an item

Identifier

  • permissions

Table permissions allow users to directly view, edit or delete data from the tables, without using a process. Permissions are defined per app role, and can be very granular.

permissions

  • testData

Sample data for testing the table

data

  • data

Data that should be automatically populated when the app is published.

data

additionalProperties

False

Examples

Minimum

key: approvedCandidates
type: table
name: Candidates
itemName: Candidate
summary:
  title: "{{firstName}}"
fields:
  firstName:
    type: text
    label: First Name

Full

key: approvedCandidates
type: table
name: Candidates
itemName: Candidate
summary:
  title: "{{firstName}} {{lastName}}"
  subtitle: "{{email}}"
fields:
  firstName:
    type: text
    label: First Name
    required: true
  lastName:
    type: text
    label: Last Name
    required: true
  email:
    type: text
    label: Email
    required: true

form:
  rows:
    - _title: Personal Information
    - [firstName, lastName]
    - email

stages:
  new:
    name: New
    description: It is a new candidate, hasn't gone through any tests
  approved:
    name: Approved
    description: Candidate has been approved
    done: true
    successful: true
  rejected:
    name: Rejected
    description: Candidate has been rejected definitively
    done: true
    successful: false

initialStage: new

permissions:
  recruiter:
    create: true
    delete:
      own: true
      assigned: true
      any: false
    view: true
    edit: ['*', '!address']
  employee:
    create: false
    delete:
      own: true
    view:
      own: ['*', '!salary']
    edit:
      own: [firstName, lastName, email]

testData:
  juan:
    firstName: Juan
    lastName: Perez
    email: juanperez@gmail.com

data:
  juan:
    firstName: Juan
    lastName: Perez
    email: juanperez@gmail.com

Warning

stages, initialStage and testData are not fully supported yet.

See: