Creating and Editing Modules
Forms are grouped within modules. This page describes the steps for editing and creating modules as well as module groups.
Introduction
In myosh, forms are clustered into functional groups called modules when they work together to serve a cohesive function.
For example, the standard Risk Assessments module contains the Risk Assessment form as well as the Hazard Templates form. The templates form is used to create reusable common hazards that can be quickly linked to in risk assessment records.
All module management steps are performed via the Administration section, under the Modules tab.
Module Groups
Purpose
For organisational purposes, modules are collated by groups. This has no functional effect on the modules, but controls their clustering in the module selection panel in the normal view (left panel). Modules that are in the same group can also be archived together.
Creating a New Module Group
In the Modules tab, use the 'NEW MODULE GROUP' button, define a name for the group, then click create. Note: this is currently only possible in the Viking 1.0 Administration
Moving Modules Within and Between Groups
Within Groups
Moving modules within groups changes their ordering within their group clustering in the navigation panel. This is done by opening (double-click) the group to open the list of modules therein, then dragging the modules in the list into the desired ordering. Note: this is currently only possible in the Viking 1.0 Administration
Between Groups
Moving modules between groups can only be done via first exporting the module definition, which yields a downloadable .json file, then deleting the module from the system, and then importing it to another module group. These actions can be taken from the module list window when opening a module group.
Warning: Deleting a module will also erase all records created from all forms in that module, and is not recommended for modules that are already in use. If this must be done, module form records should first be exported and later re-imported. Some data, such as attachments, cannot be transferred in this action.
If the original module cannot reasonably be deleted, the exported module definition file must first be altered to give it a different, unique viewId value. This can be done by editing the downloaded .json file to modify this value. Only then can the module be re-imported without a system conflict. It is recommended to also rename the display Name of one of the copies and/or hide the original module (more details below).
Also note that the module import process can be complex, particularly when record links are in place. Guidance on the importing wizard is beyond the scope of this page.
Moving Module Groups
In the module groups list, group ordering can be controlled by dragging into the desired order. Note: this is currently only possible in the Viking 1.0 Administration
Archiving Module Groups
Groups of modules can be archived by opening (double click) the module group, then ticking the Archived checkbox near the top. This will render all modules in the group and their associated records inaccessible to users until restored by unticking the checkbox again.
Modules
Creating a New Module
To create a new module, you must first open a module group within which the module will be organised. Moving the module after this step is complex (see above), so take care to decide carefully where the module should be placed.
Use the Add (for Viking 2.0) or NEW MODULE (for Viking 1.0) button to open the create window. Here you must define:
- The displayed Name value, which is recommended but not required to be unique.
- A unique View ID value. This is the internal system identifier of the module. For example, the module named "Risk Assessments" has a View ID of "riskassessments".
- The module type. Leave on the default module option if creating forms. If the module is an external resource (i.e. not a standard forms-based module), you can select embedded url, which reveals the field to supply the destination link as well as the options to i. Have it opened in the same or a new browser tab ii. Enable/disable the module availability in the mobile app iii. Include the username of the logged in user as a parameter in the url.
- Optionally hide the module from the navigation bar. Note that the module and its forms will still be accessible and usable via direct links, record links, etc.
- Optionally default the module view to to show the aggregate of all records across all module forms in the default module list. For example, the Inspections module has various inspection type forms and you may wish to by-default always view the full collection of inspection records across all types when opening the module records list.
- Select an icon for the module, used in the navigation panel.
- Choose one or more existing user groups that will be able to access the module.
Editing a Module
Changing the module setup is done via the same window as for creating a module (see above), which can also be accessed by opening the module (double click) from the list of modules within a module group.
Creating Module Content
To populate a module with forms, see the Managing Modules and Forms page.
Version: 1
Managing Modules and Forms
This guide explains the distinction between top-level modules and the forms within them, and outlines the process for adding new modules to your system.
Form Design Fundamentals
Explains core principles for designing forms, including cloning, prerequisites, and best practices to optimize performance and usability.