Jump to content
We've recently updated our Privacy Statement, available here ×

Pre-select all options for 'multi-select query'?


manakhimova

Recommended Posts

  • Replies 4
  • Created
  • Last Reply

Top Posters In This Topic

Thanks for idea and great article on your blog :-)

As I'm using "$X{IN, column_name, listOfValues}",  it sems like simbol "%" can't help me. So I set by default

$P{listOfValues}=Arrays.asList(new Object[]{"All"})

and use this kind of parameter for sub-query:

$P{listOfValues}.contains("All") ?
        "" :
        " AND $X{IN, column_name, listOfValues} "

Link to comment
Share on other sites

Oh now I see what you are doing. The example above is for the SQL query itself, not for parameters, so you are correct -- it won't work in this case.

 

But I think the parameter above should work. It makes sense to append " AND $X{IN, column_name, listOfValues}" only when the listOfValues does not contain All.

Link to comment
Share on other sites

  • 9 years later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...