Prompt not related to any filter

Web Intelligence question:

How do I create a prompt that is not related to any filter?

I would like to use the value entered by the user to implement something similar to a case statement in SQL Server:

so if user enters “USD” at the prompt: the last column of my report table will show values from the ValueInUSD universe column, if user enters “CND”: the column will show values from the ValueInCND universe column.

Web Intelligence 12.1


pl80 (BOB member since 2012-09-18)

Welcome to B:bob:B!

Do you have an access to the universe? If yes then you can create a predefined filter there that uses @prompt() function and that is always true, it means it will not filter any records when it’s used. A pseudo-code would be something like:

 @prompt(...parameters go here...) = @prompt(...parameters go here...)

Marek Chladny :slovakia: (BOB member since 2003-11-27)

Marek,

Thanks for your help. Can you write actual code? I’m getting “Invalid Definition” error the whole time :frowning:


pl80 (BOB member since 2012-09-18)

Hi,

Can you post the syntax that you tried and did not work? We can work it out from there.


Marek Chladny :slovakia: (BOB member since 2003-11-27)

@Prompt(‘Enter value:’, ‘A’, ‘Class1’, mono, constrained) = @Prompt(‘Enter value:’, ‘A’, ‘Class1’, mono, constrained)

I’ve even tried:

MyTable.Id = @Prompt(‘Enter value:’, ‘A’, ‘Class1’, mono, constrained)

Just to see if @Prompt is working, but it still doesn’t. The syntax parses correctly in the Designer, but I get an error in WebI.


pl80 (BOB member since 2012-09-18)

Hi,

Try the following:

@Prompt('Enter value:', 'A', , mono, free) = @Prompt('Enter value:', 'A', , mono, free)

It will not parse because it will not reference a real table. But it should work without a problem when you will use it in a WeBi report query.


Marek Chladny :slovakia: (BOB member since 2003-11-27)

Sweet, this is working well!!! :+1:

Big thanks / Dzieki wielkie


pl80 (BOB member since 2012-09-18)

You’re welcome 8)


Marek Chladny :slovakia: (BOB member since 2003-11-27)