Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
How to use multi values parameter in dataset?
Arif shah
<p>Hi,</p><p> </p><p>I have created a parameter type listbox where I have allowed to select multiple values. I want to use this parameter in the dataset. I want that if a user does not select any value, the dataset should show everything but if the user selects one or multiple values, then the dataset should filter values according to the parameter values</p><p> </p><p>Let's say the parameter is City where user can select one or more cities or none. If the user does not select any city, show data for all cities but if the user selects one or more cities, then show data according to selected cities</p><p> </p><p>Current I have added a filter</p><p> </p><p>row["City"] in params["City"].value</p><p> </p><p>The problem with this filter is that it shows data if I select one or more cities, but if I select no city, the charts are empty. How can I handle the none selected parameter?</p><p> </p><p>Arif</p>
Find more posts tagged with
Comments
rgleason
<p>Arif, </p><p> </p><p>You will need to update the query to ignore the portion of the where clause containing "City" if you would like an "All" or "none selected / all" functionality. </p><p> </p><p>Your data set is looking for 'SELECT some, attributes, and, stuff FROM theTable WHERE cityName in (myParameterValues)' So when a user doesn't select a city, or selects some non-city value to include all cities in the query you need to drop the WHERE clause. </p><p> </p><p>This can be done in the beforeOpen of your dataset. </p><p> </p><p>I believe I may have posted an example of this in the past. Just do a quick search here, for "dynamic query" and I think you'll find what I'm talking about. </p><p> </p><p>Thanks, </p><p> </p><p>RG</p>
GLO_FR
<p>Hi Arif,</p><p> </p><p>just in case here is an example.</p>
micajblock
<p>Or search DevShare</p><p> </p><p><a data-ipb='nomediaparse' href='
http://developer.actuate.com/community/forum/index.php?/files/file/1068-simple-example-of-select-all-parameter/'>http://developer.actuate.com/community/forum/index.php?/files/file/1068-simple-example-of-select-all-parameter/</a></p>
;