Update Quantities (from connected tables)
Add os subtract values
With the action “Update Quantities (from connected tables)”, you can add or subtract values of a record in a main table from records in connected records when the chosen trigger is activated.
Trigger -> Action
The most important thing about a trick is understanding its conditions and actions. They have a simple generic structure:
When the condition (trigger) happens, then do (action).
Trigger -> Action
Example:
How to create
You just have to click on the "+ Automations" icon on the upper right corner of the screen to open the No code automations panel, and then on the "+ Create new automation" button:
Select the trigger of your choice to activate the action, then select the "Update Quantities (from connected tables)" action, and fill in the options:
- Chose the Main tab:
- This is tab in which the quantity to be updated is located. For example, it could be an "Inventory" tab, if you're updating "Quantity" in an inventory.
- Set the quantity field to update:
- This is the field to be updated. For example, it could be the "Quantity" field in the "Inventory" tab.
- Choose the secondary tab where the quantities to be added/subtracted are found:
- In the "Inventory" example, it could be a "Items sold" or "Items purchased" tab.
- Choose the field that links the secondary tab to the record being created/updated:
- In the "Inventory" example, it will be the "Purchase" connected field in the "Items purchased" that links to the "Purchases" record.
- Choose the field that links the secondary tab to the main tab:
- In the "Inventory" example, it will be the "Item" connected field in the "Items purchased" tab that links to the "Inventory" record.
- Choose the field on the secondary tab that has the quantities to add or subtract:
- In the "Inventory" example, it will be the "Quantity" field in the "Items purchased" tab.
- Set the id of the record being created/updated:
- In the "Inventory" example, this would be the id of the sale that has connected "Items sold".
- Choose whether to add or subtract quantity
- Multiplier(optional):
- Numeric value. Number added or subtracted will be multiplied by this (defaults to 1 when left empty).
Click on save
Updated about 2 years ago