RSS
 

Posts Tagged ‘single select prompt’

PHP Analaytics – Filter data on user input

31 Jan

Just today I have got a question about the chance to add prompts to the wordpress page in order to filter dinamically a particular view.

Due to lack of time I didn’t develop any administration interface to add input boxes, but it’s possible to achieve it by using the PHP Analytics’ variables.

1. A simple single value filter

First of all we create one or more variables that will dynamically change the where condition that refers to the query we want to be affected by the user input.

Then we modify the query itself to pick up values from the variable(s).

A PHP Analytics variable is initialized with a GET or a POST action, so in order to pass the user input to the variable we have to create an HTML form that contains an HTML input component with the same name of the variable (see the example below):

<form method="post">
<select name="country">
      <option value="France">France</option>      <option value="Germany">Germany</option>      <option value="Greece">Greece</option>      <option value="Italy">Italy</option>      <option value="Portugal">Portugal</option>      <option value="Spain">Spain</option>      <option value="UK">UK</option></select>
    <input id="button" name="button" type="submit" value="Submit" />
</form>

Then we just have to add to our WordPress page/post the HTML code above and the view it belongs to (see the example below).

COUNTRY USERS
Italy 653

Read the rest of this entry »

 

OBIEE Tips #5: Too many values in single select prompt

20 Dec

OBIEE’s single select prompt can’t display by default more than 256 values (It displays a “Too Many Values” value at the end of the list when the number of values is greater than 256).

This can be fixed in two ways:

1) edit the instanceconfig.xml file by adding the following line:

<Prompts><MaxDropDownValues>MAX_VALUES</MaxDropDownValues></Prompts>

where MAX_VALUES is the number of values the prompt will display.
Take care: a big value could affect the performances.

Read the rest of this entry »