Mike,
You're already on the right track by thinking about this Automation in terms of the "state" of a record. We just need to determine which state change should trigger the Automation. The record's order status is a state, and it does help identity the type of records this Automation should pick up. However, what we really want to know about the record's state is "should it sync," and using a record's order status state isn't giving us a complete answer for the state of "should it sync." I've found tracking the state of "should it sync" is easier by using a "trigger checkbox."
Here's a quick example:
Let's say the trigger field is named [Copy Trigger]. When a user clicks the "Approve" button, that record would be updated to have [Order Status] = "Approved"
and [Copy Trigger] = True. The automation would then search for records where [Copy Trigger] = True, and set [Copy Trigger] = False on the first step. Since we're just looking for the state of "should it sync" instead of the state of "Order Status = Approved", we are excluding any "Approved" records that have already sunk. To recap:
- Button sets [Order Status] = "Approved" and [Copy Trigger] = True
- Automation triggers on record update where [Copy Trigger] = True
- Step 1 of Automation is to set [Copy Record] = false on the record that that triggered the Automation
- Automation then does stuff
------------------------------
Evan Westbrook
PRIME Developer
Harder Mechanical Contractors Inc.
Portland OR
------------------------------
Original Message:
Sent: 10-24-2019 12:04
From: Mike Klausing
Subject: Automation Loop
I have an automation that is triggered when a field "order status" is changed to Approved. Order status is changed to Approved when the user clicks a button.
My issue is that when one record is approved I can get all of the data I want moved over to the other table like I need, however when the automation is triggered for 1 newly approved record, it duplicates already approved records as well in my table the automation is copying to.
How can I get it to only move over newly approved records and not every record that has "approved" in the order status field. Just the one that was clicked on, because the other approved orders would have already been moved over there.
------------------------------
Mike Klausing
------------------------------