关闭

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

标签: scrollfiletablelistc
454人阅读 评论(0) 收藏 举报
分类:

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:

1 <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.

2) Change the single-select value prompt to the multi-select value prompt. Multi-select value prompt displays all the values without limitation.

By default it displays the first 50 values and a link to show the next 50 and so on.
This value can be modified; just edit the instanceconfig.xml file by adding the following line:

1 <Prompts><MaxScrollValues>SCROLL_VALUES</MaxScrollValues></Prompts>

where SCROLL_VALUES is the values’ range number to show.

3) If you need to use a single select prompt because of business requirements, the best way is to create a first prompt by which you can select a first subset of values and constrained the next one on that.

The example above has been done quickly by changing the “Starts With” prompt formula that generates the range values with the following code:

01 CASE
02 WHEN SUBSTRING("D5 Employee"."E01 Employee Name" FROM 1 FOR 1) = 'A' THEN 'A-F'
03 WHEN SUBSTRING("D5 Employee"."E01 Employee Name" FROM 1 FOR 1) = 'B' THEN 'A-F'
04 WHEN SUBSTRING("D5 Employee"."E01 Employee Name" FROM 1 FOR 1) = 'C' THEN 'A-F'
05 WHEN SUBSTRING("D5 Employee"."E01 Employee Name" FROM 1 FOR 1) = 'D' THEN 'A-F'
06 WHEN SUBSTRING("D5 Employee"."E01 Employee Name" FROM 1 FOR 1) = 'E' THEN 'A-F'
07 WHEN SUBSTRING("D5 Employee"."E01 Employee Name" FROM 1 FOR 1) = 'F' THEN 'A-F'
08
09 WHEN SUBSTRING("D5 Employee"."E01 Employee Name" FROM 1 FOR 1) = 'G' THEN 'G-L'
10 WHEN SUBSTRING("D5 Employee"."E01 Employee Name" FROM 1 FOR 1) = 'H' THEN 'G-L'
11 WHEN SUBSTRING("D5 Employee"."E01 Employee Name" FROM 1 FOR 1) = 'I' THEN 'G-L'
12 WHEN SUBSTRING("D5 Employee"."E01 Employee Name" FROM 1 FOR 1) = 'J' THEN 'G-L'
13 WHEN SUBSTRING("D5 Employee"."E01 Employee Name" FROM 1 FOR 1) = 'K' THEN 'G-L'
14 WHEN SUBSTRING("D5 Employee"."E01 Employee Name" FROM 1 FOR 1) = 'L' THEN 'G-L'
15
16 WHEN SUBSTRING("D5 Employee"."E01 Employee Name" FROM 1 FOR 1) = 'M' THEN 'M-R'
17 WHEN SUBSTRING("D5 Employee"."E01 Employee Name" FROM 1 FOR 1) = 'N' THEN 'M-R'
18 WHEN SUBSTRING("D5 Employee"."E01 Employee Name" FROM 1 FOR 1) = 'O' THEN 'M-R'
19 WHEN SUBSTRING("D5 Employee"."E01 Employee Name" FROM 1 FOR 1) = 'P' THEN 'M-R'
20 WHEN SUBSTRING("D5 Employee"."E01 Employee Name" FROM 1 FOR 1) = 'Q' THEN 'M-R'
21 WHEN SUBSTRING("D5 Employee"."E01 Employee Name" FROM 1 FOR 1) = 'R' THEN 'M-R'
22
23 WHEN SUBSTRING("D5 Employee"."E01 Employee Name" FROM 1 FOR 1) = 'S' THEN 'S-Z'
24 WHEN SUBSTRING("D5 Employee"."E01 Employee Name" FROM 1 FOR 1) = 'T' THEN 'S-Z'
25 WHEN SUBSTRING("D5 Employee"."E01 Employee Name" FROM 1 FOR 1) = 'U' THEN 'S-Z'
26 WHEN SUBSTRING("D5 Employee"."E01 Employee Name" FROM 1 FOR 1) = 'W' THEN 'S-Z'
27 WHEN SUBSTRING("D5 Employee"."E01 Employee Name" FROM 1 FOR 1) = 'X' THEN 'S-Z'
28 WHEN SUBSTRING("D5 Employee"."E01 Employee Name" FROM 1 FOR 1) = 'Y' THEN 'S-Z'
29 WHEN SUBSTRING("D5 Employee"."E01 Employee Name" FROM 1 FOR 1) = 'Z' THEN 'S-Z'
30
31 ELSE 'UNKNOWN'
32
33 END

That should not be done in a production environment; infact it’s better to map the range values in a table and add the appropriate business logic.

0
0

查看评论
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
    个人资料
    • 访问:455926次
    • 积分:5353
    • 等级:
    • 排名:第5024名
    • 原创:73篇
    • 转载:160篇
    • 译文:0篇
    • 评论:30条
    文章分类
    最新评论