Forum Discussion

CharlotteM's avatar
CharlotteM
Qrew Assistant Captain
6 years ago

Tracking history without logging

I have a text field that I want to keep one "previous" value for, in a separate field (not logging).

This  text field has an automation that updates it when a field in a connected table in QB Online changes.  Or, a human could update it directly from a form.

When the text field is updated, by the human or the automation, I want the current value to be moved into the "previous" field.

It seems like this should be easy but I can't see how to do it for both update ways.


------------------------------
Charlotte
------------------------------
  • If I've understood you properly, you have two fields [Current Value] and [Previous Value]. When [Current Value] updates, regardless of how, [Previous Value] should be set the the old value of [Current Value]. A second Automation can set your [Previous Value] field to be the Old_Value of your [Current Value]. The second Automation should fire only when [Current Value] is modified, but it will fire in response to any change, whether it comes from a user or another Automation, (or an API call, or whatever else might change it).

    ------------------------------
    Ben Smith
    ------------------------------
    • CharlotteM's avatar
      CharlotteM
      Qrew Assistant Captain

      For the second Automation, I don't see how to write the Action portion.

       

      In the Trigger, I can say "If the record changes, and the Current-Acct field is updated...."

       

      But then in the Modify Action, it doesn't automatically stay in the same record, it wants to modify a related record.

       

      I can choose the same table using the "advanced" feature, but

      • I don't see how to go to only the record that was just updated (I don't want to update all of them!)
      • I don't see any way to choose the "previous value" in the action portion, like you can when you are modifying a related record.

       

      What am I missing?

       



      ------Original Message------

      If I've understood you properly, you have two fields [Current Value] and [Previous Value]. When [Current Value] updates, regardless of how, [Previous Value] should be set the the old value of [Current Value]. A second Automation can set your [Previous Value] field to be the Old_Value of your [Current Value]. The second Automation should fire only when [Current Value] is modified, but it will fire in response to any change, whether it comes from a user or another Automation, (or an API call, or whatever else might change it).

      ------------------------------
      Ben Smith
      ------------------------------
  • Charlotte,

    I believe you need three fields.   

    [Current Value]
    [Current Value Sync]
    [Previous Value]

    The automations need to fire in a sequence that will ensure you do not lose the information when the Save occurs.

    When [Current Value] changes, the first automation needs to write the value of [Current Value Sync] to [Previous Value]
    When [Previous Value] changes, the second automation writes the value of [Current Value] to [Current Value Sync]

    [Current Value Sync]  is a hidden field that you do not let any Users or other automations access.

    ------------------------------
    Don Larson
    Paasporter
    Westlake OH
    ------------------------------
  • Hi,

    Have you looked into the uickBase Actions? Select the Table that the field is in and go to Settings > QuickBase  Actions.

    ------------------------------
    sckaram sckaram
    ------------------------------