SwiftMEAPJavaScript

Swift MEAP™ JavaScript Reference
October 2014

This guide is for users with some coding experience who are familiar with the data source that you are connecting to, the Swift MEAP™ Admin and client applications, their data structures, and operations. 
The purpose of this guide is to provide an introduction to using JavaScript code by describing the JavaScript commands and formatting that are supported within the Swift MEAP™ application. This guide shows the level of customization that is possible for Swift MEAP™. 

Before You Begin

If there is no JavaScript icon available on the Module Settings page in the Admin application, then this indicates that JavaScript functionality has not been enabled for the Swift MEAP™ Server. Use the following procedure to enable JavaScript functionality for Swift MEAP™. 

To enable JavaScript functionality

  1. Start the Admin application.
  2. Click Administrator, then click System Keys on the vertical navigation bar.
    1. On the System Key Information page set the following key to Yes: is.visible.js.functionality
    2. Yes is the default value for the is.visible.js.functionality system key. When you disable JavaScript functionality (by setting this system key to No), any existing JavaScript functions that have already been configured for modules are also disabled.
  3. Click Update to save the changes.
  4. Click Map Settings, then Module Settings on the vertical navigation bar.
  5. On the Module Settings page that opens, the JavaScript icon is available in the list of Icons already present. The JavaScript icon indicates that you can configure JavaScript functions for modules.


To enable the built-in javascript validation feature, go to the Administrator section of the Admin application, select system keys as above, and set 'is.to.validate.js' to 'Yes'. Once enabled, your javascript will be validated when you click the save button and any errors will be displayed at the top of the javascript window. Once your JavaScript is syntactically correct, it will save without error. This validation does not guarantee that your code will provide the desired results, merely that it has no syntax errors.