Block Queries in Analyses

Users working with analyses can invoke custom JavaScript to validate analysis criteria and column formulas. The validation allows for queries to be blocked when editing an analysis. The custom JavaScript must be accessible through a web server. To enable this feature, administrators specify the URL of the web server in system settings and register the web server as a safe domain.

  1. Develop your custom validation scripts in JavaScript, store them in a web server, and make a note of the URL pointing to the JavaScript (*.JS) file containing the custom scripts.
    For example, you might develop a blocking script that you store in myblocking.js, and the URL might be:http://example.com:8080/mycustomscripts/myblocking.js.
  2. Specify the URL of your web server in system settings:
    1. Click Console, then click Advanced System Settings.
    2. In URL for Blocking Queries in Analyses, enter the URL that you noted in Step 1.
  3. Register the web server as a safe domain:
    1. Click Console, then click Safe Domains.
    2. Add an entry for the domain in the URL you specified in Step 2.
      For example, you might add: example.com:8080.
    3. For options, select Script and Connect.
  4. Test your validation scripts:
    1. Open an analysis.
    2. Run the analysis with both valid and invalid criteria.
    3. Verify that queries are blocked as expected.