Manually Changing Presentation Setting Defaults

18-16 System Administrators Guide for Oracle Business Intelligence Enterprise Edition HTML script type=textjavascript src=fmap:myblocking.js HTML WebMessage WebMessageTable WebMessageTables The following code example shows blocking based on the formula entered. This is a formula blocking function. It makes sure the user does not enter an unacceptable formula. function validateAnalysisFormulasFormula, sAggRule { do not allow the use of concat || in our formulas var concatRe = \|\|gi; var nConcat = sFormula.searchconcatRe; if nConcat = 0 return You used concatenation character position + nConcat + . That is not allowed.; no case statements var caseRe = CASE.+ENDgi; if sFormula.searchcaseRe = 0 return Do not use a case statement.; Check for a function syntax: aggruleformula aggrule should not contain a . var castRe = \s\w+\s\.+\\sgi; if sFormula.searchcastRe = 0 return Do not use a function syntax such as RANK or SUM.; return true; } After making this change, either stop and restart the server for Oracle BI Presentation Services, or click the Reload Files and Metadata link on the Administration page.

18.5.4 Validation Helper Functions

These functions are defined within a JavaScript file named answersqueryblocking.js. Table 18–4 contains the list of helper functions and their descriptions. Table 18–4 Validation Helper Functions Validation Helper Function Description CriteriaValidator.getSubjectArea Returns the name of the subject area referenced by the analysis. It generally is used in a switch statement within the function before doing other validation. If the analysis is a set-based criteria, then it returns null. CriteriaValidator.tableExistssTable Returns True if the specified folder table has been added to the analysis by the content designer, and False if the folder was not added. CriteriaValidator.columnExistssTable, sColumn Returns True if the specified column has been added to the analysis by the content designer, and False if the column was not added. Configuring and Managing Analyses and Dashboards 18-17

18.6 Specifying View Defaults for Analyses and Dashboards

You can control certain aspects of the initial state of new views that are added to an analysis and of new objects that are added to a dashboard page. For example, you can add a default footer to new analyses and set defaults for dashboard sections. You control these aspects by customizing the appropriate XML message files to override the default values that are specified during installation.

18.6.1 XML Message Files for View Defaults

This section describes the XML message files to customize to override the view defaults distributed with Oracle BI Presentation Services. For analyses, the file answerstemplates.xml includes a message named kuiCriteriaDefaultViewElementsWrapper from within kuiAnswersReportPageEditorHead. This message includes two additional messages, kuiCriteriaDefaultViewElements, in which you can define default values, and kuiCriteriaDefaultViewElementsMask, in which masks are defined. The mask XML message is protected and you cannot modify its contents. The wrapper message adds the combined XML into a JavaScript variable, kuiDefaultViewElementsXML, that is used to apply the new default values. For dashboards, the file dashboardtemplates.xml includes a message named kuiDashboardDefaultElementsWrapper that adds XML into a JavaScript variable named kuiDefaultDashboardElementsXML for use within the dashboard editor.

18.6.2 Examples of Customizing Default Values for Analyses and Dashboards

The following sections provide examples of customizing default values: CriteriaValidator.dependentColumnExists sCheckTable, sCheckColumn, sDependentTable, sDependentColumn Checks to ensure 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, then the folders are validated. If any column from checkTable is present, then a column from dependentTable must be present. CriteriaValidator.filterExistssFilterTable, sFilterColumn Returns True if a filter exists on the specified column, and False if no filter is present. CriteriaValidator.dependentFilterExistssC heckTable, sCheckColumn, sFilterTable, sFilterColumn Checks to ensure 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.filterCountsFilterTable, sFilterColumn Returns the number of filter values that are specified for the given logical column. If the filter value is equals, null, notNull, or in, then it returns the number of values chosen. If the column is not used in a filter, then it returns zero. If the column is prompted with no default, then 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. Table 18–4 Cont. Validation Helper Functions Validation Helper Function Description