Latest News

Monday, September 22, 2014

OBIEE 11g Case Insensitive Search on Dashboard Prompt

 
 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.

  • Google+
  • Pinterest
« PREV
NEXT »

3 comments

  1. Hey! That's pretty interesting!
    But here's the question: should I do this change every time that I apply a new OBIEE patch?

    ReplyDelete
    Replies
    1. @RIMSKAYA_M : Mostly not required, Unless a bundled patch is applied. I rather suggest you to take a backup and apply the patch.

      Delete
  2. Thanks for sharing this wonderful blog with us! Keep updating.
    Core Java Online Training Hyderabad
    Visit us: Java Online Training

    ReplyDelete