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)
dataset beforeopen: cannot convert null to an object
Arif shah
<p>Hi,</p>
<p> </p>
<p>My requirement is that if a user selects values from a multiselect parameter, show data according to the criteria but if he does not select anything, show everything. My syntax is below</p>
<pre class="_prettyXprint">
var myParam = params["EmployeeName"].toString();
if (myParam != '' && myParam != null) {
var myVar = " EmployeeName in ('" + myParam.replace(/\,/g,"','") + "')";
this.queryText = this.queryText.replace('1=1', myVar);
}</pre>
<p>This works ok If I select anything from the multiselect parameter, but if don't select anything, I get the below error</p>
<p> </p>
<p>Cannot convert null to an object</p>
<p> </p>
<p>Can someone please tell me how can I update the above query so that it also accepts no selected parameter and shows everything</p>
<p> </p>
<p>Regards</p>
<p>Arif</p>
Find more posts tagged with
Comments
micajblock
<p>Multi select parameters are arrays.</p>