Categories
- All Categories
- 15 Oracle Analytics Sharing Center
- 14 Oracle Analytics Lounge
- 212 Oracle Analytics News
- 42 Oracle Analytics Videos
- 15.7K Oracle Analytics Forums
- 6.1K Oracle Analytics Idea Labs
- Oracle Analytics User Groups
- 78 Oracle Analytics Trainings
- 14 Oracle Analytics Data Visualizations Challenge
- Find Partners
- For Partners
Blocking analysis in answers in Obiee 12c

OBIEE 12.2.1.4
I tried to yous chapter 17.6 from this doc
https://docs.oracle.com/middleware/1221/biee/BIESG/answersconfigset.htm#BIESG2026
but with no success
I created 2 files
answerstemplates.xml
<?xml version="1.0" encoding="utf-8"?>
<WebMessageTables xmlns:sawm="com.siebel.analytics.web.messageSystem">
<WebMessageTable system="QueryBlocking" table="Messages">
<WebMessage name="kuiCriteriaBlockingScript" translate="no">
<HTML>
<script type="text/javascript" src="fmap:myblocking.js" />
</HTML>
</WebMessage>
</WebMessageTable>
</WebMessageTables>
and myblocking.js
function validateAnalysisCriteria(analysisXml)
{
// Create the helper object
var tValidator = new CriteriaValidator(analysisXml);
// Validation Logic
if (tValidator.getSubjectArea() != "Sample Sales")
return "Try Sample Sales?";
return true;
}
I have cluster with two OBI server instances with shared resource folder
Also I use custom styles (https://gianniceresa.com/2017/02/obiee-12c-custom-style-using-shared-folder/ ). I keep them in folder c:\Oracle\analyticsRes\ on each instance
then I made two attempts
1. I created folder analyticsRes in y:\bidata\components\OBIPS\, placed these two into this folder and restarted OBIPS.
No success
2. I placed these two file in each custom styles forlder(c:\Oracle\analyticsRes\), redeployed apps and restarted OBIPS
No succes
Has anyboby tried to block any queries in Answers in OBIEE 12c?
there are a lot of manuals regarding 10g-11g but I have found no such manual for 12c
Answers
-
I could get it to work by changing file
c:\Oracle\Middleware\Oracle_Home\bi\bifoundation\web\msgdb\messages\answerstemplates.xml
BUT I've found huge BUG.
when i use English letters as text all ok but if I change only one letter to russian(f.e) i get an error
so this works
<WebMessage name="kuiCriteriaBlockingScript" translate="no"><HTML><script type="text/javascript">function validateAnalysisCriteria(analysisXml)
{
var tValidator = new CriteriaValidator(analysisXml);
if (tValidator.getSubjectArea() != "D")
{
return "Denis";}
return "Sasha";
}</script></HTML></WebMessage>
and this not
<WebMessage name="kuiCriteriaBlockingScript" translate="no"><HTML><script type="text/javascript">function validateAnalysisCriteria(analysisXml)
{
var tValidator = new CriteriaValidator(analysisXml);
if (tValidator.getSubjectArea() != "Д")
{
return "Denis";}
return "Sasha";
}</script></HTML></WebMessage>
The error is
**kuiAnswersReportPageTabs: message text not found ***
***kuiAnswersMainSplitter: message text not found ***
***kuiAnswersReportEditorHiddenResouces: message text not found ***
0 -
The tValidator.getSubjectArea() maybe return a value encoded in a way or another, so you would want to check that.
For your issue that you get an error just by having the russian character, try encoding it, like using the ASCII value or one of those alternative ways to get that char out from standard characters.
0 -
DONE
1. In file c:\Oracle\Middleware\Oracle_Home\bi\bifoundation\web\msgdb\messages\answerstemplates.xml change
"<script type="text/javascript">function validateAnalysisCriteria(analysisXml) {return true; // by default, no checking is done}</script>"
with
"<script type="text/javascript" src="fmap:myblocking.js" />"
2. Create file myblocking.js, save with UTF-8 ENCODING and place it into folder "c:\Oracle\analyticsRes\res" on both instances. This folder was created for custom styles.
My c:\Oracle\Middleware\Oracle_Home\user_projects\domains\bi_domain\config\fmwconfig\biconfig\OBIPS\instanceconfig.xml
has such settings
<URL>
<CustomerResourcePhysicalPath>c:\Oracle\analyticsRes\res</CustomerResourcePhysicalPath>
<CustomerResourceVirtualPath>/analyticsRes/res</CustomerResourceVirtualPath>
</URL>
3. Update deployment analyticsRes in weblogic console
My myblocking.js file content is
function validateAnalysisCriteria(analysisXml)
{
var tValidator = new CriteriaValidator(analysisXml);
if (tValidator.getSubjectArea() == "Область1" )
{
if (tValidator.tableExists("Таблица1") && tValidator.tableExists("Таблица1"))
return "Нельзя одновременно выбрать данные из таблицы Таблица1 и Таблица2";
return true;
}
return "Ден";
}
0