Script Modules offers creating reusable, ready-made templates for your business logic compatible with ES6 modules. When you need that specific logic in another script, you don't have to write or copy-paste the code again. You can easily include the block of code from the script module, saving time and ensuring consistency. It not only saves you time but also makes your code easier to manage and reuse whenever necessary.
Add a Script Module
To add a new script module, follow these steps:
Navigate to (settings) >> CodeX >> click Script Modules in the menu. Click the New Module button.
In the Module Name field, provide a name for the template.
Code the script according to your business requirements.
Click the Publish button and confirm your action.
A new script module will be added to Qntrl. You also have the option to save it as a draft and publish it later by clicking Save as Draft.
Edit or modify a Script Module
To edit a script module:
Navigate to (settings) >> CodeX >> select Script Modules in the menu. Click on the name of the server module you wish to edit from the displayed list in the home page.
Make required modifications.
Click the Publish button and confirm your changes.
The server module will be updated.
Enable or Disable Server Modules
When a server module is disabled, it cannot be used in the codex script.
Navigate to (settings) >> CodeX >> click Script Modules in the menu. In the column Active, toggle the button to enable or disable a script module.
Delete a Script Module
To delete a script module:
Navigate to (settings) >> CodeX >> click Script Modules in the menu. Hover over the name of the server module you want to delete, click mouse over action menu, , and select Delete. Confirm your delete action.
Deleted codex modules can no longer be used in codex scripts.