Adding custom functions from a file
About this task
- Start each function with the keyword
'function'. For details about syntax, see Syntax for custom functions.
- 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.
'@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:
- Date and Time
- Math and Trigonometric
- Place the
functions.jsfile in the QMF for Workstation or QMF for WebSphere user home directory.If you want to share
functions.jswith other users, they will have to copy the functions.js file to their home directories.
- Launch or restart your application.
The function is added to the defined category and can be used for building expressions for calculated columns, dynamart filters, and scheduler.
This allows you to implement various features in other QMF objects such as visual dashboards. For example, you can display data retrieved from a table on a map according to address information from that table. For more information, see Displaying data on a map according to address information retrieved from a query.