Timestamp Field

  • 0
  • 1
  • Question
  • Updated 1 year ago
  • Answered
I have a field name Password and another field name Timestamp. The Password field can be edited by a user. I want the timestamp field to be updated whenever the Password field is changed. How would I do this?
Photo of Sania

Sania

  • 476 Points 250 badge 2x thumb

Posted 1 year ago

  • 0
  • 1
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 69,704 Points 50k badge 2x thumb
It depended on whether you are allowing users to edit via Grid Edit.

If you are forcing them to use a form, then you can use a simple form rule.

When the record is saved
And
Password has changed

Change the value in Timestamp to the current date/time
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 69,704 Points 50k badge 2x thumb
You can make that field read only so that it can only be updated when the password is changed and users cannot fake the date/time.
Photo of Sania

Sania

  • 476 Points 250 badge 2x thumb
Thank you! This makes sense :)
Photo of Kevin O'Boyle

Kevin O'Boyle

  • 602 Points 500 badge 2x thumb
Question: in grid edit, would you write a webhook?
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 69,704 Points 50k badge 2x thumb
I would do it with an Action.

To do that you need to create a report link field so that the @ctiin knows which record to edit. Create a report link field which links to the record being edited. It’s a cute trick which works well.

Post back if you need more details with that report link setup.
Photo of Kevin O'Boyle

Kevin O'Boyle

  • 602 Points 500 badge 2x thumb
That’s perfect. Thanks
Photo of Kipp

Kipp

  • 258 Points 250 badge 2x thumb
Do you know a way of implementing this using dynamic form rules for multi-select text fields? I notice that "has changed" doesn't appear as one of the choices when creating the dynamic rule. Working great for numeric and text fields though!
(Edited)
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 69,704 Points 50k badge 2x thumb
I have not tested form rules on multi-select fields but I’ve take your word for it that they don’t work for the has changed rule.

But if you make a new formula Text field

ToText([my multi select field])

Then you will have a text field and presumably the form role will work. But you will need to have this field be on the form it’s self so that the form will remember to recalculate it. You don’t need to have a visible on the form so you can create a dummy form rule to hide it but it does need to be on the form.
Photo of Kipp

Kipp

  • 258 Points 250 badge 2x thumb
Brilliant idea thanks! I'm sure that will solve it
Photo of Kipp

Kipp

  • 258 Points 250 badge 2x thumb
Unfortunately it seems the dynamic form rules don't notice the change in the formula text field. I assume this is because it is changed via a formula rather than the user directly editing the referenced field. Any idea of a workaround for the workaround?
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 69,704 Points 50k badge 2x thumb
Did you put that formula text field visibly on the form for your testing?
Photo of Kipp

Kipp

  • 258 Points 250 badge 2x thumb
Placed it within a tab - my understanding is that a tab behaves no differently to a section but I will test it with the field out of the tab just in case. Do you know whether that might make a difference?

In the meantime I have set up a workaround using an Action to create a new timestamp record in another table each time the field is edited and then added a summary field to the original table which shows MAX date created from the timestamp table. A little more messy but with the added benefit of being able to eventually graph user engagement over time. During this exercise I have discovered the limit of 10 Actions per table since I originally began creating one Action per field that I wanted to track. There are 20 in total worth tracking, but thankfully only 4 are multi-select so I currently have 4 using Actions and the remainder of the fields are tracked using dynamic form rules. The reason for having one Action per field is because I need the Action to pass on the identity of the field that has been edited. Currently doing this using "write the value". Also, the user is likely to edit more than one field each time, each one requiring a new entry on the tracking table and I'm not aware of a single Action being able to create multiple records at once. Any ideas to the contrary would be really helpful!

In summary I now have timestamps for all 20 fields (4 of them multi-select), thank you for your help.