Tables define the structure for an Smartmate app to store data. Each table should be defined in it’s own YAML file.
How tables work¶
Each table is defined by a table YAML file. When the workspace is published, Smartmate will create these tables in the workspace database.
Data in a table can be inserted, modified or deleted in two ways:
By a process: A process can add or modify information. The process needs to be connected to a table through the
mainTableproperty. See the process documentation for more information.
By a user: A user with proper table permissions, can add, modify or delete data directly.
The first way ensures that data is entered following a structured process. The second way makes the system flexible, it allows users to enter data that does not fit into a structured process, exceptions, or corrections.
Adding a table¶
You can add tables to an app, using the cli command
sm add table from within an app folder. The CLI will ask you a few questions and create a YAML file that defines the table.
You can always edit the YAML file. After making any changes, you can run
sm validate to validate them.