Forum Discussion

JeffMickelsen's avatar
JeffMickelsen
Qrew Cadet
4 years ago

Getting Real Time For Field

In this discussion, I will use the word timestamp in the generic sense and not with any QuickBase specific definitions.  Also, this problem is happening to mobile device users.

I have a form which includes the following url formula.  This URL Formula puts a timestamp in the Job Start date/time field.
URLRoot() & "db/"&[_DBID_XXXXXXXX]&"?a=API_EditRecord&rid=" & [Related Order] &
"&_fid_1=" & URLEncode(Now()) & URLEncode(Now()) &"&rdr=" & URLEncode(URLRoot() & "db/" & Dbid()&"?a=dr&rid="&[Record ID#])

This formula creates a button on my form which when pushed, changes a Date Time field in another table to the value Now().  I use similar formulas for several other purposes such as Job End, Time Card Start, and Time Card End.

This formula does exactly what is expected, except it uses the time the form was loaded instead of the current time.  So if a user loads a form at 8:00am and then without refreshing the form, hits the button at 9:00am, instead of loading 9:00pm (current time), it uses 8:00am (the time the form was loaded).  Generally the form is refreshed frequently enough that the difference is not significant, but when the form is not refreshed frequently, it is creating work time analysis problems and pay check problems.  

Any ideas on how to get the current device time instead of the form load time?

------------------------------
Jeff Mickelsen
------------------------------

5 Replies

  • You can set up an Automation triggered when the button is pushed (maybe also update a field called [Date Time Automation triggered], and it can update that record with the current date time. 

    Be sure to contrive it so if a person (e.g. manager)  legitimately needs to edit the time, they can without the Automation overwriting it.

    ------------------------------
    Mark Shnier (YQC)
    Quick Base Solution Provider
    Your Quick Base Coach
    http://QuickBaseCoach.com
    mark.shnier@gmail.com
    ------------------------------
    • JeffMickelsen's avatar
      JeffMickelsen
      Qrew Cadet
      Thanks. That should be easy. Thanks.

      Jeff Mickelsen
      JPM Consulting
      Sent from my iPhone

      • JeffMickelsen's avatar
        JeffMickelsen
        Qrew Cadet
        Because an automation always takes longer to run than a screen refresh, This will leave the field on my form named "Job Start Time" as a blank when the screen is repainted.  It will hold the correct value when the screen is manually refreshed.  Is there a way to delay the refresh until the automation has completed?  Or to force a screen refresh from the last step of the automation?


        ------------------------------
        Jeff Mickelsen
        ------------------------------