Jump to content
  • 1

Search Form Above Results Page


Ronan

Question

Hello everyone,

I have a Report Datapage and I have configured it to have the search form above my results page. But when I access my DataPage it is displaying all the records right away. Like ever records on my table, and I don't want that.

I only want to display the results of the search that the user of my Datapage made. Please help.

- Ronan

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

Hi @Ronan

I have this type of DataPage on my Application now, and I was able to hide the default record that is being displayed when I access my Search and Report DataPage. To apply my workflow, just follow the steps below.

1. On your Search and Results DataPage, ensure that you have selected  to Display the search form above the results http://prntscr.com/m2rzrb

2. Click on next until you reached the 'Configure Search Fields' tab insert a Virtual field, then set the form element to be hidden http://prntscr.com/m2s1h9

3. Click on Advance tab, then click on 'Pass field value as parameter' http://prntscr.com/m2s2az

4.  Add a Header and Footer ( If you don't have one yet ) then go to the advance tab of the Footer, then unchecked Enable HTML editor http://prntscr.com/m2s2xc

5. Then go back to the Standard tab and copy and paste the code below http://prntscr.com/m2s44j

<script>

document.addEventListener('DataPageReady', function() {
// Change the name of your Virtual field, if you have a virtual field named as Virtual5 used the example below
// ex: document.querySelector('[id*=cbParamVirtual5]').value = "Y";
document.querySelector('[id*=cbParamVirtual1]').value = "Y";

});


</script>

6. Click on next until you reached on the 'Configure Results Page Fields' tab, then add a Calculated field, then copy and paste the code below and remove the label http://prntscr.com/m2s53j

// change this to the name of your virtual field, just like above

CASE WHEN '[@Virtual1]' = 'Y'

THEN 'block'

ELSE 'none'

END

7.  Add Header and Footer, then click on Header and disable the HTML editor (step 4) in the Advance tab. Then go back to the standard tab and past the code below http://prntscr.com/m2s6m5

<div style="display: [@calcfield:1#]">

8. Then go to the Footer and  disable the HTML editor (step 4) in the Advance tab. Then go back to the standard tab and past the code below  http://prntscr.com/m2s6fk

</div>

9. Hide your Calculated field that you have created in (step 6 ) by enclosing it in two html block. Then put the code in each of the HTML block below. http://prntscr.com/m2s7wk

// for the HTML block 1 , or the one above the cacluated field use this code

<table style="display:none;">
  
  
// for the HTML block 2 , or the one below the cacluated field use this code
  
</table>

Aside from the configuration steps above, you can configure your report DataPage in every way that you want ( use your prefered DP style , have a details page if you want , etc.)

 

I hope this helps.

Regards,

TsiBiRu

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...