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
------------------------------
Original Message:
Sent: 10-29-2019 17:50
From: Everett Patterson
Subject: is it possible to add current date in report description
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
Original Message:
Sent: 10-29-2019 17:00
From: Adam Keever
Subject: is it possible to add current date in report description
The second one works, but not the first one:
------------------------------
Adam Keever
Original Message:
Sent: 10-29-2019 16:27
From: Everett Patterson
Subject: is it possible to add current date in report description
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
Original Message:
Sent: 10-29-2019 15:47
From: Adam Keever
Subject: is it possible to add current date in report description
Here is the result I get with IOL:
------------------------------
Adam Keever
Original Message:
Sent: 10-29-2019 15:16
From: Everett Patterson
Subject: is it possible to add current date in report description
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
Original Message:
Sent: 10-29-2019 12:01
From: Adam Keever
Subject: is it possible to add current date in report description
Copy & Paste gives me this syntax error and I can't find a fix:
------------------------------
Adam Keever
Original Message:
Sent: 10-29-2019 10:45
From: Everett Patterson
Subject: is it possible to add current date in report description
If you are familiar with script, then yes it's easily done.
------------------------------
Everett Patterson
Original Message:
Sent: 10-29-2019 01:35
From: Pushpakumar Gnanadurai
Subject: is it possible to add current date in report description
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
------------------------------