Capturing the time a form is entered

  • 0
  • 1
  • Question
  • Updated 2 years ago
  • Answered
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?
Photo of David Berndt

David Berndt

  • 262 Points 250 badge 2x thumb

Posted 2 years ago

  • 0
  • 1
Photo of Matthew Neil

Matthew Neil

  • 31,678 Points 20k badge 2x thumb
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?
(Edited)
Photo of Ⲇanom the ultimate (Dan Diebolt)

Ⲇanom the ultimate (Dan Diebolt), Champion

  • 30,044 Points 20k badge 2x thumb
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
(Edited)
Photo of David Berndt

David Berndt

  • 262 Points 250 badge 2x thumb
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?
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 65,280 Points 50k badge 2x thumb
Alas, you did not like my suggestion below?
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 65,280 Points 50k badge 2x thumb
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.
Photo of David Berndt

David Berndt

  • 262 Points 250 badge 2x thumb
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?
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 65,280 Points 50k badge 2x thumb
Can you uncheck the box to say to only fire when the condition becomes true?  ie so it fires all the time?
Photo of David Berndt

David Berndt

  • 262 Points 250 badge 2x thumb
That solved it - thanks for the quick response