simo.tuokko Posted June 7, 2018 Share Posted June 7, 2018 Hi,I am trying to create cascading input control with multi-select queries in both of them.I am using $X{IN, fieldname, listFromFirstInputControl} in the query of the second Input Control.It basically works but now it always returns all records if there are no selections in first Input Control as $X{IN.. returns 0=0.How this could be changed so that when there is no selections in first Input Control no result would be shown in second Input Control? Link to comment Share on other sites More sharing options...
steven.song Posted June 22, 2018 Share Posted June 22, 2018 You could try starting the where for the second input control with a 1=2 followed by an OR for all your X In parameters.ie:SELECT Orders, OrderId, Country, City from OrderList where 1 = 2 or ($X{IN, Country, listFromFirstInputControl} ) Link to comment Share on other sites More sharing options...
simo.tuokko Posted June 25, 2018 Author Share Posted June 25, 2018 This doesn't help as it will produce following where clause when listFromFirstInputControl is empty:"WHERE 1=2 OR 0 = 0"So it will still return all the rows. Link to comment Share on other sites More sharing options...
Solution simo.tuokko Posted June 22, 2021 Author Solution Share Posted June 22, 2021 I forgot that I made this question here. Solution was quite simple, just added clause that list should not be empty list:AND '$P!{listFromFirstInputControl}' != '[]' Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now