Quick Base Discussions

Expand all | Collapse all

Did anyone implemented a countdown timer in quickbase

  • 1.  Did anyone implemented a countdown timer in quickbase

    Posted 08-03-2017 19:13
    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.


  • 2.  RE: Did anyone implemented a countdown timer in quickbase

    Top
    Contributor
    Posted 04-05-2018 03:17
    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.


  • 3.  RE: Did anyone implemented a countdown timer in quickbase

    Top
    Contributor
    Posted 04-05-2018 10:20
    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/


  • 4.  RE: Did anyone implemented a countdown timer in quickbase

    Bronze
    Contributor
    Posted 05-29-2018 03:04
    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?


  • 5.  RE: Did anyone implemented a countdown timer in quickbase



  • 6.  RE: Did anyone implemented a countdown timer in quickbase

    Bronze
    Contributor
    Posted 05-29-2018 17:47
    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)