Oracle® Business Intelligence Presentation Services Administration Guide > Administering Oracle BI Answers > Blocking Requests in Answers >

Validation Helper Functions


These functions are defined within a JavaScript file named answers/queryblocking.js. Table 9 contains the list of helper functions and their descriptions.

Table 9. Validation Helper Functions
Validation Helper Function
Description

CriteriaValidator.getSubjectArea()

Returns the name of the subject area referenced by the request. It generally is used in a switch statement within the function before doing other validation. If the request is a set-based criteria, it returns null.

CriteriaValidator.tableExists (sTable)

Returns True if the specified table has been added to the request by the user, and False if the table was not added.

CriteriaValidator.columnExists (sTable, sColumn)

Returns True if the specified column has been added to the request by the user, and False if the column was not added.

CriteriaValidator.dependentColumnExists(sCheckTable, sCheckColumn, sDependentTable, sDependentColumn)

Checks to make sure that the dependentColumn exists if the checkColumn is present. It returns True if either the checkColumn is not present, or the checkColumn and the dependent column are present. If checkColumn and dependentColumn are null, the tables are validated. If any column from checkTable is present, a column from dependentTable must be present.

CriteriaValidator.filterExists(sFilterTable, sFilterColumn)

Returns True if a filter exists on the specified column, and False if no filter is present.

CriteriaValidator.dependentFilterExists(sCheckTable, sCheckColumn, sFilterTable, sFilterColumn)

Checks to make sure that the dependentFilter exists if the checkColumn is present in the projection list. It returns True if either the checkColumn is not present, or the checkColumn and the dependent filter are present.

CriteriaValidator.filterCount(sFilterTable, sFilterColumn)

Returns the number of filter values specified for given logical column. If the filter value is "equals," "null," "notNull," or "in," it returns the number of values chosen. If the column is not used in a filter, it returns zero. If the column is prompted with no default, it returns -1. For all other filter operators (such as "greater than," "begins with," and so on) it returns 999, because the number of values cannot be determined.

Oracle® Business Intelligence Presentation Services Administration Guide Copyright © 2007, Oracle. All rights reserved.