Forum Discussion
_anomDiebolt_
8 years agoQrew Elite
This was pretty easy to do. Here you go:
StopWatch
https://haversineconsulting.quickbase.com/db/bnsjt3e2s?a=td
Paste Database
https://haversineconsulting.quickbase.com/db/bgcwm2m4g?a=dr&rid=666
Notes
(1) I used the library FlipClock:
FlipClockJS
http://flipclockjs.com/
(2) This demo is intended for a user to observe and manipulate their own timers. If multiple users are manipulating the same timer there will probably be some confusion as the underlying state of the time may become inconsistent with what is displayed for another user.
StopWatch
https://haversineconsulting.quickbase.com/db/bnsjt3e2s?a=td
Paste Database
https://haversineconsulting.quickbase.com/db/bgcwm2m4g?a=dr&rid=666
Notes
(1) I used the library FlipClock:
FlipClockJS
http://flipclockjs.com/
(2) This demo is intended for a user to observe and manipulate their own timers. If multiple users are manipulating the same timer there will probably be some confusion as the underlying state of the time may become inconsistent with what is displayed for another user.
- JessicaHaskins8 years agoQrew CadetThis is perfect thank you! What type of fields are the last start time, last stop time and last saved time?
- _anomDiebolt_8 years agoQrew EliteThe fields are numeric and hold elapsed seconds (not milliseconds). They are "passed" to the script using data attributes on the timer <div> and updated when the appropriate button is clicked. They should be considered internal states of the timer and not normally displayed.
- JessicaHaskins8 years agoQrew CadetCould I still use the last start time and last stop time to create a new field to calculate the duration? I also created my own form to test out the stop watch, but the flipclock isn't displaying. I've attached pictures of the display, formula, variables and code page. Any ideas on how to fix it?
- _anomDiebolt_8 years agoQrew EliteIf timer is stopped ( [Last Start Time] <= [Last End Time] )you can calculate the duration as:
Seconds([Last Saved Time])
But if the timer is running ( [Last Start Time] > [Last End Time] ) the duration is evolving: ... - JessicaHaskins8 years agoQrew CadetI tried using the demo in one of my forms, but it only displays the start, stop and reset timer buttons. It doesn't display the flipclock, because I don't have FlipClock.js downloaded. I've never used java and I was wondering how exactly to download the jQuery 1.7 and FlipClock.js libraries to use in the quickbase code page. Are there any tutorials or resources that could help me?
- _anomDiebolt_8 years agoQrew EliteThose two files are loaded in the script from the CloudFlare CDN:
var urlFlipClockJS = "https://cdnjs.cloudflare.com/ajax/libs/flipclock/0.7.8/flipclock.min.js";
var urlFlipClockCSS = "https://cdnjs.cloudflare.com/ajax/libs/flipclock/0.7.8/flipclock.min.css"; - JessicaHaskins8 years agoQrew CadetI directly copied the script into the moduleTimer.js page, but the flipclock isn't working. Is there any way we could set up a GoToMeeting so I can troubleshoot the problem with you?
- _anomDiebolt_8 years agoQrew EliteYou have to change these parameters at the top of your scrip to match your application, table and apptoken:
var dbid = "bnsjt2vbm";
var dbidTimers = "bnsjt3e2s";
var apptoken = "bfk55cggkj2vxd64kyhnctc4zm";
You will also have to change several other instances in the code where there are reference to field ids so that they match your fields.
_fid_7
_fid_8
_fid_10 - JessicaHaskins8 years agoQrew CadetSorry for so many questions. Where did you get the dbid and dbidTimers string? I understand it comes from the application and table. But I'm not sure where you found the characters from. I understand the apptoken string is from the settings>app properties>manage
- _anomDiebolt_8 years agoQrew EliteThe naming convention I use is that the variable dbid is the dbid of the application and variable dbid<TableName> is the dbid of a specific table. Both of these dbid strings are in the URL. Examples:
https://login.quickbase.com/db/9kaw8phg
https://login.quickbase.com/db/6ewwzuuj?a=q&qid=6