Writen by
Devil
12:17 PM
-
4
Comments
OBIEE 11g Case Insensitive Search on Dashboard Prompt
To make case insensitive search on Dashboard Prompt, Follow below steps to configure filter behaviour in OBIEE application.
We need to modify columnfilterprompt.js In following two locations on the OBIEE Application Server
Locations:
A)\OracleBI\web\app\res\b_mozilla\prompts
B)\OracleBI\oc4j_bi\j2ee\home\applications\analytics\analytics\res\b_mozilla\prompts
Steps Involved:
1)Take a backup of columnfilterprompt.js
2)Open Columnfilterprompt.js in a text editor and search for the below function
function CFPRefresh(sViewID, sType, numPageValues, sDisplay, sFilter, sCallFunction, bNoRefresh)
{
——–
——–
——–
if(document.getElementById(sViewID + “MatchTable”))
{
//if (tForm.Constraint.value != “”)
{
var sValue = null;
switch (tForm.Match.value)
{
case “beginsWith”:
sValue = CFPSqlEscape(tForm.Constraint.value) + “%”;
break;
case “endsWith”:
sValue = “%” + CFPSqlEscape(tForm.Constraint.value);
break;
case “contains”:
sValue = “%” + CFPSqlEscape(tForm.Constraint.value) + “%”;
break;
}
if (sValue != null)
sWhere = aColumns[0] + ” LIKE ‘” + sValue + “‘”;
}
}
——
——
}
3. Now comment the bold content i.e sWhere = aColumns[0] + ” LIKE ‘” + sValue + “‘”; and add this code in if (sValue != null) loop.
Code:
sWhere = “UPPER(“+aColumns[0]+”)” + ” LIKE UPPER(‘” + sValue + “‘)”;
4.JS Code should look like this:
function CFPRefresh(sViewID, sType, numPageValues, sDisplay, sFilter, sCallFunction, bNoRefresh)
{
——–
——–
——–
if(document.getElementById(sViewID + “MatchTable”))
{
//if (tForm.Constraint.value != “”)
{
var sValue = null;
switch (tForm.Match.value)
{
case “beginsWith”:
sValue = CFPSqlEscape(tForm.Constraint.value) + “%”;
break;
case “endsWith”:
sValue = “%” + CFPSqlEscape(tForm.Constraint.value);
break;
case “contains”:
sValue = “%” + CFPSqlEscape(tForm.Constraint.value) + “%”;
break;
}
if (sValue != null)
//sWhere = aColumns[0] + ” LIKE ‘” + sValue + “‘”;
sWhere = “UPPER(“+aColumns[0]+”)” + ” LIKE UPPER(‘” + sValue + “‘)”;
}
}
—–
—–
—-
}
5. Restart the Oracle Java host service and Presentation services.
6. Now test the prompt with different case letters and observe that it returns values.
Hey! That's pretty interesting!
ReplyDeleteBut here's the question: should I do this change every time that I apply a new OBIEE patch?
@RIMSKAYA_M : Mostly not required, Unless a bundled patch is applied. I rather suggest you to take a backup and apply the patch.
DeleteGreat Article
ReplyDeleteJava Online Course | Java EE Training
Java Training Institutes in Chennai | java j2ee training institutes in chennai | Java Training in Chennai | J2EE Training in Chennai | Java Course in Chennai
Java Interview Questions | Java Training Institutes | IT Technical Articles
Thanks for sharing this wonderful blog with us! Keep updating.
ReplyDeleteCore Java Online Training Hyderabad
Visit us: Java Online Training