If you are unable to create a new account, please email support@bspsoftware.com

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

extract certain parts of a dynamic string

Started by trooper642, 05 Jun 2008 09:12:27 AM

Previous topic - Next topic

trooper642

Hi,

I would like to extract certain parts of a dynamic string.
I have a multi select value prompt pulling the field [Division Number â€" Name] with the parameter name = pDivisionNoName.

Example:
pDivisionNoName = “001 â€" Div A, 002 â€" Div B, 004 â€" Div D”
I would like to produce this “001, 002, 004” just extracting the number before the “-“.
-----------------------
I used the below expression with success when setting the prompt to single select.
substring(?pDivisionNoName?,1,(position(' - ',?pDivisionNoName?)-1))

The parameter value is coming from a parent drill through report in RS with a cube data source.
If I can explain/ provide any more detail please let me know.

-Bryan

kattaviz

Hi,
If u r using the Division code(001) as use value in the parameter, u can display those values using the syntax "paramValue(parametername)".

For example;
Your value prompt displays the division names but uses the division codes to filter the data in the report, then use the code "paramValue(parametername" to disolay only the dicision codes.

HTH
thanks & regards
Satish Katta

trooper642

My parameter comes from a parent drill through cube report and I’m only able to pass the visible value from the report which contains a combination of “Number - Name”. In the cube I have 2 separate dimension containing “Number â€" Name” and “Number” but they don’t stay in sink with each other because there is no relation between the two. The reason why I want to extract the number is due to the warehouse “Division Number” field being indexed.

-Bryan