Jump to content

Refresh Tabular Datapage Without Refreshing the Webpage


Recommended Posts

I have a search form with a tabular report displayed below the search on a webpage, Page 1. When user clicks update, they are taken to a new webpage, Page 2, that opens in a new tab. On Page 2, they can edit the details of the record and take other actions like make an association to this record.

The user would then close the tab with Page 2 and return to the tab with Page 1 where their search results are presented in the tabular report.

The data they entered on Page 2, however, is not displayed in the tabular report on Page 1 and if they refresh the webpage, their search filters are removed and they have to search again.

I am looking for solutions such as:

- Add a button that refreshes just the tabular report section of the datapage

- Add a button that refreshes an individual record in the tabular report

- Keep the search parameters upon refresh of the webpage

 

Link to comment
Share on other sites

Hi @wimtracking2

Are the search form and tabular report the same DataPage or are these two separate DataPages?

If this is one DataPage, you can separate search and report into 2 DataPages and deploy both of them on your webpage. In this setup, when clicking on the search again, it will refresh just the tabular report part without refreshing the search parameters.
As a search form, you will use regular submission form DataPage, which will pass and receive respective search parameters parameters
image.png.a4fb3356334624db6bab014b82f93439.png
And on the tabular report, you add filters that receive these external parameters on load

For the form to not trigger page reload, the destination after record submit must be set to the "Same form"
And also, this JS snippet must be added to the header or footer of the form
 

<script>
document.addEventListener('BeforeFormSubmit', function(event) {
event.preventDefault();
</script>


 

Link to comment
Share on other sites

  • 7 months later...
On 7/17/2023 at 8:11 AM, Volomeister said:

Hi @wimtracking2

Are the search form and tabular report the same DataPage or are these two separate DataPages?

If this is one DataPage, you can separate search and report into 2 DataPages and deploy both of them on your webpage. In this setup, when clicking on the search again, it will refresh just the tabular report part without refreshing the search parameters.
As a search form, you will use regular submission form DataPage, which will pass and receive respective search parameters parameters
image.png.a4fb3356334624db6bab014b82f93439.png
And on the tabular report, you add filters that receive these external parameters on load

For the form to not trigger page reload, the destination after record submit must be set to the "Same form"
And also, this JS snippet must be added to the header or footer of the form
 

<script>
document.addEventListener('BeforeFormSubmit', function(event) {
event.preventDefault();
</script>


 

Hi. 

I have the same situation where I am using a datapage that uses an HTML link to send the user to another datapage which they  use to edit or delete a record. After making the update, they close out of that page. But the original page does not refresh just the data search that was already run without going back to the search page to rerun the query again. 

Link to comment
Share on other sites

Hi @CaspioBaller

You can add this JS code to the header of your search form on the tabular report:

 

<script>
if (document.visibilitychangeListener == undefined) {

document.addEventListener("visibilitychange", () => {
    if (document.hidden){return}
Object.keys(dataPageManagerObj.dataPages).forEach(key=>{
    if(dataPageManagerObj.dataPages[key].dataPageType == 'ResultSet') {
    dataPageManagerObj.dataPages[key].refresh()
    }
})
})
document.visibilitychangeListener='enabled'
}
</script>

 

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
Reply to this topic...

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