Jump to content
  • 0

Pass Parameter


Hastur

Question

Hi there!

I need help with the following case.

I have two chart Datapages deployed on a single web-page.

  1. Chart + Report Datapage with Search form above the report;
  2. Chart Datapage;

In my first Datapage I have a Listbox type of form element with multi-select option enabled.

I pass a parameter (on exit) for this field.

Finally, I want to receive this parameter on the second Datapage to filter the data based on multiple parameters within single search field.

My second Datapage does not show any data as soon as I try to select more than one criteria in the Listbox from 1st Datapage.

Any help would be appreciated.

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 1

Hi @Andrew,

I am afraid that you will not be able to parse multi-select Listbox parameter in your second Datapage, however you should be able to achieve the desired logic of filtering if you use search form with multi-select Listbox on your second Datapage. You can create a Javascript code which would click on the "Search" button within 2nd Datapage after user clicks on "Search" on the 1st Datapage and also hide a Search form from the 2nd Datapage.

Here is JS code which I have used:

1. Wrap a Search from from 2nd Datapage with the following:

Header:

<div id="search_form">

Footer:

</div>

2.  This code should be placed in the Footer of the 2nd Datapage.

<script type="text/javascript">
    
document.addEventListener('DataPageReady', function (event) {
//hide a search form from 2nd DP
document.querySelector("#search_form").style.display = "none";

let buttons = document.querySelectorAll(".cbSearchButton");

//adding onclick event listener to the 1st DP search form
  
buttons[0].addEventListener("click", ()=> {
    
    //clicking on search button of 2nd DP with a delay
  
    setTimeout(()=>{buttons[1].click();}, 500)


}, false);

});
</script>

 

Hope this helps.

Regards,

vitalikssssss

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...