Did anyone implemented a countdown timer in quickbase

  • 0
  • 1
  • Question
  • Updated 6 months ago
  • Answered
I have created a Bid app in quickbase, so i wanted to implement a countdown timer into the form where they update there Bid Price.
The Count down timer should show days/time left out before the Bid will be closed.
Photo of Sneha Wankhede

Sneha Wankhede

  • 244 Points 100 badge 2x thumb

Posted 1 year ago

  • 0
  • 1
Photo of Matthew Neil

Matthew Neil

  • 31,438 Points 20k badge 2x thumb
I think I know a way this could work.  Are you still looking for a solution?

p.s. I was searching for something else and saw this, even though I know its old.
Photo of Ⲇanom the ultimate (Dan Diebolt)

Ⲇanom the ultimate (Dan Diebolt), Champion

  • 26,522 Points 20k badge 2x thumb
See this demo which counts down the days till Festivus::



FlipClock

https://haversineconsulting.quickbase.com/db/bnkkufhin?a=dr&r=b&rid=1

Pastie Database
https://haversineconsulting.quickbase.com/db/bgcwm2m4g?a=dr&rid=648



Notes

(1) The colons between the Days, Hours, Minutes and Seconds are too large for some reason. I am going to assume it is  some interaction between QuickBase's and FlipClock's CSS and is easy to fix.

(2) FlipClock can be found here:

http://flipclockjs.com/

(3) I also have an Odomoter solution if you are interested:

http://github.hubspot.com/odometer/
(Edited)
Photo of Micro Dev

Micro Dev

  • 834 Points 500 badge 2x thumb
I like this. Good idea...

How about a button which should display how a counter of how long this task has been opened for.

I have a button after clocking in it says In since 8:58 pm. I would like it to say 00:00 and show live by seconds and minutes.

My button formula is: (originally from ABC Project management) 

var text gray = "<a style=\" text-decoration: none; background: #c2c2c2; border-radius: 5px; color: #fff; display: inline-block; width: 150px; text-align: center; padding: 8px 20px; font: normal 700 14px/1 \"Calibri\", sans-serif; text-shadow: none; \">Checked Out</a>";

var text green = "<a style=\" text-decoration: none; background: #34a853; border-radius: 5px; color: #fff; display: inline-block; text-align: center; width: 150px; padding: 8px 20px; font: normal 700 14px/1 \"Calibri\", sans-serif; text-shadow: none; \">In since "&[Time-In]&"</a>";

If([Maximum Record ID# In]>[Maximum Record ID# Out],$green,$gray)

Is this something easy?
Photo of Ⲇanom the ultimate (Dan Diebolt)

Ⲇanom the ultimate (Dan Diebolt), Champion

  • 26,522 Points 20k badge 2x thumb
You can combine the above demo with this one:

New Demo Time On Form
https://community.quickbase.com/quickbase/topics/new-demo-time-on-form
Photo of Micro Dev

Micro Dev

  • 834 Points 500 badge 2x thumb
I want to use the following code:
//module2.js
(function(){

  var dbid = "bnhipanch";
  var dbidTable = "bnhiu5b67";
  var apptoken = "km77t6cxnfntudtaandxcn3cu7d";
  $.ajaxSetup({data: {apptoken: apptoken}});

  var querystring=document.location.search;

  if (/a=nwr/i.test(querystring)) {

    var timeFormOpen = new Date().getTime();
    $("#_fid_7").attr("readonly", true);
    $("#_fid_8").on("click", function() {return false});
    
    setInterval(function() {
      var timeCurrent = new Date().getTime();
      $("#_fid_7").val(parseInt((timeCurrent - timeFormOpen)/1000, 10) + " seconds");
    }, 1000);
  }

})();


but I need to show the timer on the button I am using and replace ">In since "&[Time-In]&" with the timer which will time from the "Time in" time.

Can you help me with this? Thanks

var text gray = "<a style=\" text-decoration: none; background: #c2c2c2; border-radius: 5px; color: #fff; display: inline-block; width: 150px; text-align: center; padding: 8px 20px; font: normal 700 14px/1 \"Calibri\", sans-serif; text-shadow: none; \">Checked Out</a>";

var text green = "<a style=\" text-decoration: none; background: #34a853; border-radius: 5px; color: #fff; display: inline-block; text-align: center; width: 150px; padding: 8px 20px; font: normal 700 14px/1 \"Calibri\", sans-serif; text-shadow: none; \">In since "&[Time-In]&"</a>";

If([Maximum Record ID# In]>[Maximum Record ID# Out],$green,$gray)