Discussions

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 13 days ago
    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 13 days ago
    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 13 days ago
    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 13 days ago
    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 13 days ago
    Hi All,

    Thanks a lot for your reply.


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



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

    Posted 13 days ago
    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 13 days ago
    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 13 days ago
    Yes, IOL on a report

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



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

    Posted 13 days ago
    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 13 days ago
    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 13 days ago
    Edited by Everett Patterson 13 days ago
    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 13 days ago
    Here is the result I get with IOL:


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



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

    Posted 13 days ago
    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 12 days ago
    The second one works, but not the first one:


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



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

    Posted 12 days ago
    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
    ------------------------------