BusinessObjects Board

filter with prompt answer

Hi,
I need to use such a filter :
= Where ( = UserResponse(DataProvider() ,“Value ?”) )

which sounds refused by BO. :?
Is there a way to filter data using prompt answers?
Thx.


Pit (BOB member since 2004-06-03)

My first question to you is why is this necessary? If it’s a prompt, isn’t the data provider result already filtered properly?

That said, your problem is because Where can only compare to a constant, not a formula. The trick is to create another variable:

<Flag>:  = If <myOtherVar> = UserResponse(DataProvider(<DP>) ,"Value ?") Then "Y" Else "N"

Then your filter would be:

=<myVar> Where (<Flag> = "Y")

Dwayne Hoffpauir :us: (BOB member since 2002-09-19)

Thx a lot! :slight_smile:

I ask the user for a year, and then consider several years around the one answered - in order to fill several parts of tables.
I wished to avoid to use several DP, because of maintenance. So, I needed such a solution.


Pit (BOB member since 2004-06-03)