Forum Discussion

DavidBerndt's avatar
DavidBerndt
Qrew Cadet
8 years ago

Capturing the time a form is entered

I need to capture a create time related to the time when the form is opened - not when it is saved. I can create a formulate that if the recordid is null it will get the time of day from now() but the else resets to null if I leave it blank and cannot reference itself. Is there a way to capture this and not have a formula run again?

8 Replies

  • MCFNeil's avatar
    MCFNeil
    Qrew Captain
    Where is the button being pushed from?  

    Because you could possibly modify that URL to write the "Now()" to a normal Date / Time field.  So it should load when the button is first pushed...

    There are some limitations there too... I'll ponder this a bit.

    Curious what your use case is?
  • Use IOL technique with this one line of script:

    _fid_7.value = new Date().toString();

    Use a form rule to hide the field from view if you want.

    If you are unfamiliar with IOL you can convince yourself this works by just opening your from in edit mode and paste the above line of script into the console and you will see the instant date/time appear in the field's entry box.



    ASK: Please Give Me Your Formulas
    https://community.quickbase.com/quickbase/topics/formula-parser-in-javascript#reply_18555784
    • DavidBerndt's avatar
      DavidBerndt
      Qrew Cadet
      Ok - I can see where that could work - but how/where do I add the IOL info so it auto-fires. Is there documentation on the IOL that I can review?
  • No problem. Make a field called [Record ID# mirror] with a formula of [Record ID#]

    Then a form rule that says
    When [Rcord ID# mirror] is blank
    Change [Date time when fiporm opened] to the current date time.
    • DavidBerndt's avatar
      DavidBerndt
      Qrew Cadet
      So when I do this, the rule does not seem to do any change. If I setup the rule to hide the field everything works but if I try to do a change (even to a static value) it does not update the field. Any ideas?
    • QuickBaseCoachD's avatar
      QuickBaseCoachD
      Qrew Captain
      Can you uncheck the box to say to only fire when the condition becomes true?  ie so it fires all the time?