Manually Changing Alternating Bar Color

Configuring and Managing Analyses and Dashboards 18-15 if tValidator.dependentColumnExistsMarkets,Region,Markets,District { If validation script notifies user, then return false alertRegion and District are well suited, do you think?; return false; } if tValidator.dependentColumnExistsSales Measures,,Periods,Year return You selected a measure so pick Year; if tValidator.filterExistsSales Measures,Dollars return Maybe filter on Dollars?; if tValidator.dependentFilterExistsMarkets,Market,Markets return Since you are showing specific Markets, filter the markets.; var n = tValidator.filterCountMarkets,Region; if n = 0 || n 3 return Select 3 or fewer specific Regions; return true; } If you do not override the function using the template as described previously, or if the function returns anything other than False, then the criteria is considered to be valid and the analysis is issued. The criteria is validated using this same mechanism for preview and save operations as well. 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.3 Blocking Analyses Based on Formula

Answers provides a hook that lets you incorporate a JavaScript validation function that is called from Answers when a content designer enters or modifies a column formula. If the call fails and returns a message, then Answers displays the message and cancels the operation. Additionally, helper functions are available so the query blocking function can check for filters, columns, and so on, rather than traversing the Document Object Model DOM manually. The DOM is a way of describing the internal browser representation of the HTML UI page that is currently being displayed in Answers. For more information about the helper functions, see Section 18.5.4, Validation Helper Functions. The criteriatemplates.xml file includes a message named kuiFormulaBlockingScript that can be overridden to include JavaScript that defines a validateAnalysisFormula function. By default, this message contains a function that always returns True. Answers calls validateAnalysisFormula before applying changes made by the content designer. If the function returns True, then the formula is accepted. If the function returns False, then the formula is rejected. Otherwise, the return value from the function is displayed in the message area beneath the formula, as it does currently when an invalid formula is entered. The content designer has the option to click OK to ignore the error. To display your own alert and allow the content designer to continue, your function should return True. To block the query, return False or a message. Your function should investigate the formula passed to it using a JavaScript string and regular expression techniques for validation. The following code example shows a sample custom message. ?xml version=1.0 encoding=utf-8? WebMessageTables xmlns:sawm=com.siebel.analytics.web.messageSystem WebMessageTable system=QueryBlocking table=Messages WebMessage name=kuiFormulaBlockingScript translate=no