Jump to content
  • 0

Creating a button in Search and Results DataPage when no records found


Harbinger

Question

2 answers to this question

Recommended Posts

  • 1

Yes all these messages are in the localization you are using for this report page. Create a copy of the localization and under  Results Pages >> Messages >> 351 No Records Found >> Add your custom text. You can also add HTML tags for instance <a href="UTL OF THE PAGE"> Add New </a> or you can also have JS. 

Link to comment
Share on other sites

  • 1

Hello @Harbinger,

 

If you wish to edit the 'No records found' message with a custom message, you may just paste the code below in the Footer of your Report DataPage > Configure Results Page Fields. Make sure to disable the HTML editor in the advanced tab before doing so.

 

<script>
document.addEventListener("DOMContentLoaded", function(event) {

  //This you may edit
  var link_title = `Let's go`;
  var href = `https://www.google.com`;


  //No edits necessary! 
  var err = document.querySelector('[id*=RecordMessageTop]');
  if (err) err.innerHTML = `<a href='${href}'>${link_title}</a>`;
});
</script>

 

This solution is particularly helpful if you have multiple DataPages relying on one Localization and you wish to edit the 'No records found' on specific DataPage(s).

 

Hope this helps.

Cheers

DN31337

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