Discussions

 View Only
Expand all | Collapse all

is it possible to add current date in report description

  • 1.  is it possible to add current date in report description

    Posted 10-29-2019 01:35
    Hi Everyone,

    Can you please let me know if is it possible to add current date in report description

    Some thing like : This is the students report as of (current_date).

    Basically i am trying to add the current date by a key word . Just want to know if there exists a key word in quickbase that can be used or is there any other way to achieve this?



    ------------------------------
    Pushpakumar Gnanadurai
    ------------------------------


  • 2.  RE: is it possible to add current date in report description

    Posted 10-29-2019 07:00
    Pushpakumar,

    I do not know of a way to do that, but will be watching this thread to see if anyone else can solve it.  This could be useful.


    ------------------------------
    Don Larson
    Paasporter
    Westlake OH
    ------------------------------



  • 3.  RE: is it possible to add current date in report description

    Posted 10-29-2019 07:11
    You can come pretty close.

    Make a formula text field and if you like use full HTML, so for example font size and color.  Call it [Report Description Title]

    Then set your Table Report to Sort and Group on on that field.

    ------------------------------
    Mark Shnier (YQC)
    Quick Base Solution Provider
    Your Quick Base Coach
    http://QuickBaseCoach.com
    markshnier2@gmail.com
    ------------------------------



  • 4.  RE: is it possible to add current date in report description

    Posted 10-29-2019 07:53
    You cannot specify/add markers in report description. It is free text only currently.  But this is a great question and you should post this under user voice for QB product team to work with. 

    The other work-around is to add a formula text field and add as a column in your report. However, this will repeat the number of records in your report.


    ------------------------------
    Babi Panjikar
    ------------------------------



  • 5.  RE: is it possible to add current date in report description

    Posted 10-29-2019 08:00
    Hi All,

    Thanks a lot for your reply.


    ------------------------------
    Pushpakumar Gnanadurai
    ------------------------------



  • 6.  RE: is it possible to add current date in report description

    Posted 10-29-2019 10:46
    If you are familiar with script, then yes it's easily done. 



    HTML in description
    Legend <br><div style="border: 1px solid black; width: 450px;">
    <img src="https://images.quickbase.com/si/24/206-enable.png">Completed<br>
    <img src="https://images.quickbase.com/si/24/238-triang_gray.png">Missing Phone Start Date<br>
    <img src="https://images.quickbase.com/si/24/240-triang_green.png">On Time<br>
    <img src="https://images.quickbase.com/si/24/213-warning2.png">Past Due<br></div><br>
    
    Report as of: <span class="mytoday" style="font-size: 24px"></span>


    Script to replace description text with HTML and inserts current date/time

    (function(){
      var querystring=document.location.search;
      if(/a=q/i.test(querystring)) {
        var description = $("#introText").text().replace(/script/g, "span");
        $("#introText").html(description);
        var mytoday = new Date().toLocaleString();
        $(".mytoday").html(mytoday);
      }
      if(/a=td/i.test(querystring)) {
        var description = $("#descriptionInFacets").text().replace(/script/g, "span");
        $("#descriptionInFacets").html(description);
        var mytoday = new Date().toLocaleString();
        $(".mytoday").html(mytoday);
    }
      if(/dlta=mog/i.test(querystring)) {
        var description = $("#descriptionInFacets").text().replace(/script/g, "span");
        $("#descriptionInFacets").html(description);
        var mytoday = new Date().toLocaleString();
        $(".mytoday").html(mytoday);
    }
    })();



    ------------------------------
    Everett Patterson
    ------------------------------



  • 7.  RE: is it possible to add current date in report description

    Posted 10-29-2019 10:51
    Everett, Are you using Image Onload to do this?

    ------------------------------
    Mark Shnier (YQC)
    Quick Base Solution Provider
    Your Quick Base Coach
    http://QuickBaseCoach.com
    markshnier2@gmail.com
    ------------------------------



  • 8.  RE: is it possible to add current date in report description

    Posted 10-29-2019 15:12
    Yes, IOL on a report

    ------------------------------
    Everett Patterson
    ------------------------------



  • 9.  RE: is it possible to add current date in report description

    Posted 10-29-2019 10:57
    Hi Everett,

    Thanks a lot for the code but i am not well versed in the scripts. I will give a try.

    ------------------------------
    Pushpakumar Gnanadurai
    ------------------------------



  • 10.  RE: is it possible to add current date in report description

    Posted 10-29-2019 12:02
    Copy & Paste gives me this syntax error and I can't find a fix:


    ------------------------------
    Adam Keever
    ------------------------------



  • 11.  RE: is it possible to add current date in report description

    Posted 10-29-2019 15:16
    Edited by Everett Patterson 10-29-2019 15:16
    Looks like you put that into a formula field, that code goes into a code page.

    You would use the IOL technique in a formula field  to load the code page.
    [iol] & "module.js" & [/iol]​

    Check out this link if you need more info, How Do I Setup the Image Onload Technique (IOL)?



    ------------------------------
    Everett Patterson
    ------------------------------



  • 12.  RE: is it possible to add current date in report description

    Posted 10-29-2019 15:47
    Here is the result I get with IOL:


    ------------------------------
    Adam Keever
    ------------------------------



  • 13.  RE: is it possible to add current date in report description

    Posted 10-29-2019 16:27
    Open your dev tools F12 and put this code into the console while on the report, does it work then? 

        var description = $("#introText").text().replace(/script/g, "span");
        $("#introText").html(description);
        var mytoday = new Date().toLocaleString();
        $(".mytoday").html(mytoday);

    or 

        var description = $("#descriptionInFacets").text().replace(/script/g, "span");
        $("#descriptionInFacets").html(description);
        var mytoday = new Date().toLocaleString();
        $(".mytoday").html(mytoday);


    ------------------------------
    Everett Patterson
    ------------------------------



  • 14.  RE: is it possible to add current date in report description

    Posted 10-29-2019 17:00
    The second one works, but not the first one:


    ------------------------------
    Adam Keever
    ------------------------------



  • 15.  RE: is it possible to add current date in report description

    Posted 10-29-2019 17:50
    Ok so use this on your code page

    (function(){
      var querystring=document.location.search;
      if(/a=q/i.test(querystring)) {
        var description = $("#descriptionInFacets").text().replace(/script/g, "span");
        $("#introText").html(description);
        var mytoday = new Date().toLocaleString();
        $(".mytoday").html(mytoday);
      }
      if(/a=td/i.test(querystring)) {
        var description = $("#descriptionInFacets").text().replace(/script/g, "span");
        $("#descriptionInFacets").html(description);
        var mytoday = new Date().toLocaleString();
        $(".mytoday").html(mytoday);
    }
      if(/dlta=mog/i.test(querystring)) {
        var description = $("#descriptionInFacets").text().replace(/script/g, "span");
        $("#descriptionInFacets").html(description);
        var mytoday = new Date().toLocaleString();
        $(".mytoday").html(mytoday);
    }
    })();​


    ------------------------------
    Everett Patterson
    ------------------------------



  • 16.  RE: is it possible to add current date in report description

    Posted 06-04-2020 13:58
    Edited by Adam Keever 06-04-2020 14:09
    Updated to correct an element for use with table including dynamic filters (use the above code for tables without dynamic filters):

    (function(){
    var querystring=document.location.search;
    if(/a=q/i.test(querystring)) {
    var description = $("#descriptionInFacets").text().replace(/script/g, "span");
    $("#descriptionInFacets").html(description);
    var mytoday = new Date().toLocaleString();
    $(".mytoday").html(mytoday);
    }
    if(/a=td/i.test(querystring)) {
    var description = $("#descriptionInFacets").text().replace(/script/g, "span");
    $("#descriptionInFacets").html(description);
    var mytoday = new Date().toLocaleString();
    $(".mytoday").html(mytoday);
    }
    if(/dlta=mog/i.test(querystring)) {
    var description = $("#descriptionInFacets").text().replace(/script/g, "span");
    $("#descriptionInFacets").html(description);
    var mytoday = new Date().toLocaleString();
    $(".mytoday").html(mytoday);
    }
    })();​

    This works in the code page.

    This also allows you to add buttons to the top of the report:


    ------------------------------
    Adam Keever
    ------------------------------



  • 17.  RE: is it possible to add current date in report description

    Posted 09-08-2020 07:37
    Hi Adam ,

    I've been trying to use the script posted by Everret but seems like it's not working for me .
    Attached scre
    Sorry i'm new to qb and unable to execute this
    enshot for reference.

    ------------------------------
    Aswathy Padikkal
    ------------------------------



  • 18.  RE: is it possible to add current date in report description

    Posted 09-08-2020 08:06
    Hi ,

    In reference to my above question , where should i place the html code ? I know i'm placing it incorrectly in the above snapshot.

    Thanks all for your help

    ------------------------------
    Aswathy Padikkal
    ------------------------------