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)
Display or hide input param based on parent input param selection value
Srinivas Yarra
<p>Hi,</p>
<p> </p>
<p>I want to display or hide the input param selection to user based on parent input param selection in dynamically. Ex: we have vendor, element type, entity type and etc input params for user selection. Here we want to display one more input param that is location param based on element type selection value is <strong>com </strong>only otherwise we want to hide location field.</p>
<p> </p>
<p>Please find the screen hot in attachments.</p>
<p> </p>
<p>We are using Actuate BIRT Designer Professional Version: 4.4.0 and Build id: v20150623</p>
<p> </p>
<p>Thanks,</p>
<p>Srinivas</p>
Find more posts tagged with
Comments
Clement Wong
<p>From what I understand, you are looking for conditional parameter selection. That is, show "Location" parameter if value of "Element Type" is "com".</p>
<p> </p>
<p>It is possible to customize the Information Console default parameter page for a new request. How are your end users running reports? Do you give them a link to log into iHub? Do they have a direct access to the executereport.do URL? Are you executing via JSAPI?</p>
Srinivas Yarra
<p>Hi Wong.</p>
<p> </p>
<p>Thank you for your reply. We are calling/executing the reports with help jsapi from our portal. How to customize the information console default parameter page for a new request?</p>
<p> </p>
<p>Thanks</p>
<p>Srinivas</p>
Clement Wong
<p>To clarify, so you are using JSAPI to display the parameters? Then, you can use a callback to perform a few jQuery operations.</p>
<p> </p>
<p>For example, if your existing JSAPI parameters call were the following:</p>
<pre class="_prettyXprint">
function showParameters() {
myParams = new actuate.Parameter("myParamContainer");
myParams.setReportName(myReportName);
myParams.submit();
}</pre>
<p>You can change that to:</p>
<pre class="_prettyXprint">
function showParameters() {
myParams = new actuate.Parameter("myParamContainer");
myParams.setReportName(myReportName);
myParams.submit(stylizeParameters); // add a callback function here
}</pre>
<p>And add the following function:</p>
<pre class="_prettyXprint">
function stylizeParameters() {
$("div.paramDisplayName:contains('Location')").parent().parent().css("display","none");
// Add an onchange event to the Element Type selector
$("div.paramDisplayName:contains('Element Type')").parent().parent().children('td').eq(1).find('select').on('change', function() {
if (this.value == "com" ) {
$("div.paramDisplayName:contains('Location')").parent().parent().css("display","block");
}
});
}</pre>
<p>You will need to make the Location parameter NOT hidden in the report design. </p>
<p> </p>
<p>In the stylizeParameters() function, we target the <TR> and hide that parameter block.</p>
<p> </p>
<p>Then, we add an onChange event to the <SELECT> of the Element Type. If the value is "com", we display the Location parameter block.</p>