Dear All
I have a filter in my Query - #prompt('pTerms', 'token')#
The associated value prompt has the following use values and display values:
use value: [Terms] like [Terms ST], display value: ST
use value: [Terms] not like [Terms ST], display value: Not ST
The [Terms ST] data item contains an expression 'ST'
I'm not able to validate the report with the above. I'm getting an error message XQE-V5-0011. There is possibly something I'm doing wrong in the filter or in the use value.
I'm thinking the 'token' in the prompt returns the use value from the value prompt and evaluate like an expression? Not sure. Has anyone got any thoughts or ideas where I was doing wrong?
BR
A filter expression evaluates to true or untrue. your filter expression does not use an equation. It would contain an operator like '=' , 'like' , '<' etc ..
OK understood. So my idea is fundamentally flawed. I shall do a workaround then. Thanks for the reply.
BR
Hi,
I would code my filter expression like this:
([Terms] like '%ST%' and ?pTerms? = 'a') OR ([Terms] not like '%ST%' and ?pTerms? = 'b')
Code your prompt with two use values - a and b, and include the desired display value for each use value (ie 'ST' and 'Not ST')
Cheers!
MF.
Thanks MFGF
That's similar to what I have done:
(?pTerms? = 'ALL' and ([Terms] like '%')) or
(?pTerms? = 'ST' and ([Terms] like 'ST')) or
(?pTerms? = 'Not ST' and ([Terms] not like 'ST'))
The following also worked for me:
case
when (?pTerms? = 'ST') then ([Terms] like 'ST')
when (?pTerms? = 'Not ST') then ([Terms] not like 'ST')
else ([Terms] like '%')
end
Glad I'm thinking on the same lines as you cognos Gurus ;-) Thanks again for your response.
BR
There is nothing wrong with your filter (#prompt('pTerms', 'token')#) as it will replace the use value of your prompt and equates to either 'True' or 'False'.