Discussions

Expand all | Collapse all

Javascript alert on report with 0 records

  • 1.  Javascript alert on report with 0 records

    Posted 04-25-2017 15:48
    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._


  • 2.  RE: Javascript alert on report with 0 records

    Posted 05-12-2017 13:54
    Inside a report you can see the total  records number 

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

    [tableId] => 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.