Skip to main content
Question

Javascript alert on report with 0 records

  • April 25, 2017
  • 0 replies
  • 36 views

I have an ask the user report where they put in a date and pull up records related to it.  I was wondering if there is a way for an alert or a message appear once the date has been selected if no records are returned.  Basically can this be done with a code page to a report or is there a way through native processes._
This topic has been closed for replies.

  • Registered
  • May 12, 2017
Inside a report you can see the total  records number 

$("table[qbdbid=] tr:first").text();

=> should be your table id , remove the square brackets

once you get the string , you can search for the string "no results". if the string consist of  "no results" make a if loop and give as an alert there are no records.

I Think this will solve your problem.