Inventory for Assemblies—Reduce all child part qty cells when parent is changed


I haven’t been able to figure this out and I’m fairly new to coding and programming. I’m trying to add multiple rows to an inbound/outbound sheet when an item (assembled part with unique number) is scanned.

I have built my app using modifications that I have found in at sheets. What I’m looking to do is provide an inventory system in which an assembly, which is composed of many sub parts, is able to track when the assembly has been made from all of the associated parts. Ultimately whenever I ship an assembly I wish to reduce all the cell values associated with the assembly and their on hand quantities.

An example would be my electrical control box assembly. I received in to the bin the 20 components, each with their own part number and qty required per assembly information, and send all the parts to an outside manufacturer. The outside manufacturer builds the boxes with all of the components that I gave him, and then he sends the completed assembly back to me. I do not wish to reduce the quantity of the parts from my on hand totals until I receive this finished back. I am looking for a trigger or function to do this.

For clarification, my inbound is parts to stock while my outbound is parts shipped.

Currently I have a table that is set up (each triggered or added to by a form) (inbound/outbound) with the first column being a unique ID(created by app sheets), product barcode(ref to my product list), and qty received. I have another table for outbound parts. On my “products” sheet it sums all incoming part totals per part on inbound sheet and all outbound parts per part on the outbound sheet to give me the “on hand qty”

Is there a way to scan barcode “assembly” and make it add all the child components, and associated qtys, to the sheet as well? Ideally I would receive 4-5 assemblies at a time, if I have to just scan it multiple times that’s okay too though.

Please check the sample app called “UpdateEventAction” from if that would solve your case. In that app, the action reduce the number with one.


Thanks for your reply. I’m not too sure how to apply this to my table though.

Basically I have 20 or so items in different qty’s that make up a certain assembly. When I “ship” or “stock” the assembly I want it to reduce the 20 items by the count appropriate to make up an assembly.

I receive the 20 or so individual parts randomly and sell them randomly as well.

Does this make sense?