Initializing help system before first use

Loading the API

Every HTML view starts with a definition in the companion file that points to the associated HTML file.
For example:
<html-view title="Input View" path="input.html"/>

The path is relative to the client_resources folder within your app bundle/ZIP file.

You should take the Quick Start app as a starting point and use one of the HTML files within there as a template. For Example, if you take the input.html file from this app it already has the latest JavaScript API loaded in with the following lines:
<link type="text/css" 
         rel="stylesheet" 
         href="$distrib/insight-4.7.css"/>
<script src="$distrib/insight-4.7.js"></script>

The JavaScript API is bundled into a single JavaScript file, $distrib/insight-4.7.js, and a single CSS file, $distrib/insight-4.7.css.

Once the JavaScript API is loaded into you view you need to wait until the API is ready before you can start using it. The reason for this is that some information about the current app, the view selection and model schema have to be loaded in before data can be accessed. Your custom code needs to be wrapped in a callback function that will be invoked when the API is ready. This is done as follows:
insight.ready(function() {
  // Your code here
});

The JavaScript API exposes a global variable called insight. This is the starting point for all API calls. There are also a few third-party libraries that are loaded in along with the JavaScript API and these are exposed as global variables too. See Appendix B for more details on what is exposed.

© 2001-2020 Fair Isaac Corporation. All rights reserved. This documentation is the property of Fair Isaac Corporation (“FICO”). Receipt or possession of this documentation does not convey rights to disclose, reproduce, make derivative works, use, or allow others to use it except solely for internal evaluation purposes to determine whether to purchase a license to the software described in this documentation, or as otherwise set forth in a written software license agreement between you and FICO (or a FICO affiliate). Use of this documentation and the software described in it must conform strictly to the foregoing permitted uses, and no other use is permitted.