You create JavaScript Modules to customize JavaScript functions
that you want to use in your visual projects.
About this task
To create a JavaScript Module, do the following actions:
Procedure
- From the main menu, select to
open the New wizard.
- In the New wizard, expand QMF Objects folder
and select JavaScript Module.
- Click Next to open the New
JavaScript Module wizard.
- Specify the name for the JavaScript Module in the Name field
and click Finish to open the JavaScript
Module editor.
- Enter JavaScript functions in the editor.
- Start each function with the keyword
'function'
.
- Add a comment before each function.
The
application interprets this comment as the description of the function.
- Optional: Define a category to which
you add a new function.
Use the '@category'
tag
in the comments to add it. If there is no such category, it will be
created.
Note: The following categories already exist in the application:
- Columns
- Aggregation
- Conversion
- Date and Time
- Information
- Logical
- Math and Trigonometric
- Misc
- Text
- Objects
- To verify the correctness of the JavaScript functions that
you entered in the editor, click the Check JavaScript syntax
and structure
toolbar button.
- After you entered the required JavaScript functions, save
the JavaScript Module to a repository or a file.