When records are linked with a relation field, the same facts often live in two places: the deal knows the price, and the property should show it too. This recipe copies values from the record that changed to every record it links to, so nobody updates the second database by hand.
Note:
Existing values are overwritten.
Update relatedreplaces the current value of every field you add, in every related record. Fields you don't add stay as they are.Only linked records change. The action works on records linked to the current record through a relation field, in either direction.
What you'll need
A database app
Dealswith the fieldsStage(a single select field with the optionClosed won),Price(number),Buyer name(text), and a relation fieldPropertythat links to thePropertiesdatabase app.A database app
Propertieswith the fieldsSold price(number) andBuyer(text).To build this automation, you need to be a
Workspace adminof the workspace the app is in and haveFull accessto theDealsapp.
Copy the deal values to the property
Open the
Dealsapp and click the automations icon at the top right (Create and view automations).Select
New automation, then selectWhen a record is updated.In the trigger, select the field name and select
StageunderFIELDS.Under
And if the following conditions are met, selectAdd filter. PickStage, thenHas changed to, thenClosed won.Select
Add action→Update related. The step readsUpdate all related records.Next to
in, select the app the deals link to:Properties.Select
Add field, then selectSold price. InValue, type@and select thePricefield of the deal.Select
Add fieldagain, selectBuyer, then type@and selectBuyer name.Select
Create automation.
Tip: Open the action's menu (•••) to find Silent and Trigger automations. Both are off by default. Turn on Silent if followers of the property shouldn't get a notification for every update. Turn on Trigger automations only if the update should start automations on Properties.
The result
The next time a deal's Stage changes to Closed won, every property linked to that deal shows the deal's price in Sold price and the name in Buyer. Open the automation's Runs to see which records the run updated.
Variations
Set a status as well. Select
Add field, pickStatus, then selectSet optionandSelect an option, and chooseSold.Add a comment to the related records. Select
Add action→Get related, thenAdd action→Comment on collected. Collected records are the records an earlier action found. Learn more about collected records →Copy only to some related records. In
Get related, changeAll recordstoFiltered recordsand add a condition, then useUpdate collectedinstead ofUpdate related.Go the other way.
Get relatedhasOutgoing via(records this record links to) andIncoming via(records that link to this one). UseIncoming viato reach records that point at the changed record, orBoth directionsto reach records on either side of the relation.
Learn more
FAQs
Will this overwrite values someone entered by hand?
Will this overwrite values someone entered by hand?
Yes! Every field you add to the action is replaced in every related record. Remove a field from the action if people should be able to change it on the property.
Can I run it for deals that are already closed?
Can I run it for deals that are already closed?
Select Manual run, then under Run on choose Selected records, Selected view, Number of records, or All records, and select Save and start run. A manual run changes real records, and it still checks the automation's filters. A manual run has no earlier values to compare with, so Has changed to doesn't match. Remove that filter or use Is Closed won before you start a manual run on existing deals.
Why did nothing change on the property?
Why did nothing change on the property?
If the property wasn't updated, it could be because:
The deal isn't linked to a property in its relation field.
The
Stagedidn't change toClosed wonin this update, so the filter stopped the run.The automation is
Paused.
Are you a developer using the Tape API for automations?
Are you a developer using the Tape API for automations?
The automation API has its own documentation for developers. Full reference: referenced_records_update in the developer docs →
Still have questions? Find answers and get help from community experts in the Tape community →
