Modules
A module stores and shapes your data (records) for a given namespace.
The data from namespace A
can not be referenced by namespace B
.
Relational database correlation:
|
Corteza Low Code supports multi-value fields, which removes the need of simple pivot tables. |
When exporting multi-value fields into the CSV format, only the first value is exported. |
Module definition guidelines
- Module name
-
The module name should be in PascalCase with spaces allowed, it should be short and descriptive, with no special characters except for
:
(colon),-
(dash),_
(underscore),/
(forward slash) and\
(backwards slash). - Module handle
-
The module handle should be in snake_case, it should be short and descriptive, with no special characters.
The provided handle must:
|
Module field definition guidelines
- Field name
-
The module field name should be in snake_case, it should be short and descriptive, with no special characters.
The provided name must:
|
- Field title
-
The maximum module field title length is 64 characters. There are no other restrictions.
- Type
-
The module field type defines the type of the stored data. Make sure to use appropriate types.
Create a module
-
navigate to the Corteza Low Code page and enter the namespace you wish to edit,
-
click on the "Admin panel" in the top right corner,
-
navigate to the "Modules" subpage,
-
enter the module name and press the "Create" button,
-
provide the module handle and save the changes.
You can only define permissions for existing modules. |
Importing modules
The current module importing system is unable to resolve relations between different modules via record fields. References must be fixed manually after the system finishes with the import. |
Currently, only the JSON format is supported. |
-
navigate to the Corteza Low Code page and enter the namespace you wish to edit,
-
click on the "Admin panel" in the top right corner,
-
navigate to the "Modules" subpage,
-
find the "Import module(s)" section on the top of the page,
-
click on the "Browse" button and select the JSON file containing module definitions,
-
click on the "Import" button,
-
select on the modules you wish to import and press the "Import" button.
Editing a module
-
navigate to the Corteza Low Code page and enter the namespace you wish to edit,
-
click on the "Admin panel" in the top right corner,
-
navigate to the "Modules" subpage,
-
click on the edit icon next to the module you wish to edit,
-
update the data and save the changes.
Deleting a module
-
navigate to the Corteza Low Code page and enter the namespace you wish to edit,
-
click on the "Admin panel" in the top right corner,
-
navigate to the "Modules" subpage,
-
click on the edit icon next to the module you wish to edit,
-
click on the "Delete" button on the bottom of the page and confirm the action.
Adding module fields
-
navigate to the Corteza Low Code page and enter the namespace you wish to edit,
-
click on the "Admin panel" in the top right corner,
-
navigate to the "Modules" subpage,
-
click on the edit icon next to the module you wish to edit,
-
click on the "+ Add new field" button,
-
configure the field as you see fit and save the changes (see module field properties).
Editing module fields
If the module contains records, the editing interface is limited. If you wish to change the disabled properties, we suggest you create a new field instead. |
-
navigate to the Corteza Low Code page and enter the namespace you wish to edit,
-
click on the "Admin panel" in the top right corner,
-
navigate to the "Modules" subpage,
-
click on the edit icon next to the module you wish to edit,
-
configure the field as you see fit and save the changes (see module field properties).
Deleting a module field
When deleting existing fields, the change will not take effect unless you explicitly save the changes. When deleting new fields, the changes take effect immediately. |
-
navigate to the Corteza Low Code page and enter the namespace you wish to edit,
-
click on the "Admin panel" in the top right corner,
-
navigate to the "Modules" subpage,
-
click on the edit icon next to the module you wish to edit,
-
click on the trashcan icon next to the field you wish to delete and save the changes.
Module field properties
- Name
-
The name for the field defines how the values are stored. If you don’t provide a title, the field name is used as the title.
The provided name must:
|
- Title
-
A human-friendly field title shown when interacting with the data. It should be short, descriptive and limited to 64 characters. No other restrictions apply.
- Type
-
The module field type defines the type of the stored data. Make sure to use the appropriate type.
- Multi value
-
Multi value fields allow you to store multiple entries under the same field. This removes the need for simple pivot tables.
When exporting multi-value fields into the CSV format, only the first value is exported. |
- Required
-
The required flag makes the field mandatory for the end-user when creating or editing a record.
- Private
-
The private flag marks the data as sensitive; such as name, email, or telephone number. This helps make your namespace compliant with privacy regulations, such as GDPR.
Module field types
Access additional configuration options, by pressing on the wrench icon next to the field type. |
The checkbox field type represents a true/false (yes/no) value; a boolean. When editing, the field is a checkbox; when viewing, it’s the value label. Additional configurations:
|
|||||
The date and time field type represents a temporal value (date and/or time); a timestamp. When editing, the field is a date-time picker; when viewing, it’s a text string. Additional configurations:
|
|||||
The email field type represents an email address (the field has some built-in value validation). When editing, the field is an email input box; when viewing, it’s either a link or a text string. Additional configurations:
|
|||||
The select / dropdown field type represents a text value that is limited to the specified set of options. When editing, the field is a native dropdown; when viewing, it’s a text string. Additional configurations:
|
|||||
The number field type represents a numerical value. When editing, the field is a number input; when viewing, it’s a formatted text string.
Additional configurations:
|
|||||
The record field type represents a reference to another record. When editing, the field is a searchable dropdown select field; when editing, it’s a clickable link.
Additional configurations:
|
|||||
The string field type represents a text string value. When editing, the fields are either regular text input or a rich-text input; when viewing, it’s a formatted text string. Additional configurations:
|
|||||
The URL field type represents a URL value (the field has some built-in value validation). When editing, the field is an URL input box; when viewing, it’s either a link or a text string. Additional configurations:
|
|||||
The user field type represents a reference to a user. When editing, the field is a searchable dropdown; when viewing its a text string (the registered name). Additional configurations:
|
|||||
The file field type represents a reference to a file uploaded to the record. When editing, the field is a file uploader; when viewing, it’s one of the configured displays. Additional configurations:
|
Module field expressions
Module field expressions let you define value expressions (formula fields), custom sanitizers, and custom validators.
Use value expressions instead of automation scripts when you need simple calculations. It is much faster and simpler to maintain. |
Value expressions calculate the field value based on the rest of the field values.
If the value expression evaluation results in an error, the errors are appended to the field error set (in the web application they are shown under the field).
If your field is a multi-value field, you need to return an array of items. Available variables in the evaluation context:
If field name collides with (they have the same name) any of reserved variables you can access them via Example expression that calculates the price with tax:
Example expression that generates a full name:
Example of a multi-value expression evaluation:
|
|||||
Sanitizers modify the field value to cleanup (sanitize) the data before it is saved. If the sanitizer evaluation results in an error, the error is logged in the action log. If you define multiple sanitizers, they are run in the defined order. Example sanitizer that limits the text length:
Available variables in the evaluation context:
|
|||||
Validators validate the field value by raising errors when the value is not valid. Validators can not change the value. Built-in field validators can be disabled; required and unique-multi-value validators can not be disabled. If you define multiple validators, they are run in the defined order.
Validation expressions are not executed when:
Available variables in the evaluation context:
Example validator to check the text length:
|
Permissions for all modules
- Read any module
-
Determines if the role is allowed to access any Corteza Low Code module.
- Update any module
-
Determines if the role is allowed to update any Corteza Low Code module.
- Delete any module
-
Determines if the role is allowed to delete any Corteza Low Code module.
- Create record under any module
-
Determines if the role is allowed to create records for any Corteza Low Code module.
- Read records under any module
-
Determines if the role is allowed to access records for any Corteza Low Code module.
- Update records under any module
-
Determines if the role is allowed to update records for any Corteza Low Code module.
- Delete records under any module
-
Determines if the role is allowed to delete records for any Corteza Low Code module.
Permissions for a specific module
- Read module "(module name)"
-
Determines if the role is allowed to access the given module.
- Update module "(module name)"
-
Determines if the role is allowed to update the properties of the given module.
- Delete module "(module name)"
-
Determines if the role is allowed to delete the given module.
- Create record of module "(module name)"
-
Determines if the role is allowed to create record entries for the given module.
- Read records of module "(module name)"
-
Determines if the role is allowed to access the records of the given module.
- Update records of module "(module name)"
-
Determines if the role is allowed to update the records of the given module.
- Delete records of module "(module name)"
-
Determines if the role is allowed to delete the records of the given module.
Permissions for all module fields
- Read any module field
-
Determines if the role is allowed to see any Corteza Low Code module field.
- Update any module field
-
Determines if the role is allowed to update any Corteza Low Code module field.
Permissions for a specific module field
- Read "(field name)" record fields
-
Determines if the role is allowed to access the given value inside the module. This will hide any data that might appear in the field.
- Update "(field name)" record fields
-
Determines if the role is allowed to update the values in the given module field. This will prevent any data manipulation for the field.