OiO.lk Community platform!

Oio.lk is an excellent forum for developers, providing a wide range of resources, discussions, and support for those in the developer community. Join oio.lk today to connect with like-minded professionals, share insights, and stay updated on the latest trends and technologies in the development field.
  You need to log in or register to access the solved answers to this problem.
  • You have reached the maximum number of guest views allowed
  • Please register below to remove this limitation

Trying to generate a packing list based on certain stock codes

  • Thread starter Thread starter Emerald Coast Music
  • Start date Start date

Emerald Coast Music

So I am fairly new to app script. I work for a manufacturing company that has a production schedule which includes things such as sales order numbers, customer name, location, work order numbers, stock codes, a general description of the stock codes. These stock codes for the most part generally have the same small parts that go together to fulfill a job. I would love to have a way to copy and paste lines from this schedule into a sheet or some other area and have it make a sheet that pulls information from the stock codes to generate a packing list and/or a bill of lading for delivery. I have begun to compile a list of stock codes that have a list of parts tied to it. For example: I have a master key sheet that includes something like this


Then I have a 'mastery query' sheet that has a column where numerous stock codes can be entered. Every time a stock code is entered it generates the associated stock code from the 'master key' sheet and organizes the items in Part A into column A of the 'master query' sheet and multiplies the quantity based on the number entered next to the stock code. For example:


1/2-13x42 ANCHOR BOLTS32

The problem I am running into is that in the 'master query' sheet I had to make 22 rows available per stock code entry in the parts list to account for the total number of parts for every stock code. (So that if I had 5 of stock codes that had 22 parts or less there would be a row for each of the columns listed in the 'master key' sheet) I discovered a way to automatically hide rows that were showing no parts or no quantity. And as long as my 22 part stock code comes first it works for the most part. If its not the longest in the list, it cuts off the list of stock codes even though the list still generates correctly in column a and b.

There has to better way. Ideally I would love to be able to copy and paste information directly from our production schedule into a sheet and then make a script that could automatically take the information i copy and paste and add the missing parts information directly into a list that could be used for packaging and shipping of the product. Here is an example of a production schedule.


I would love to be able to auto generate a packing list for my packaging team to pull all of the parts necessary in a compiled list from several stock codes that could be generated from a trigger in the stock code and add information such as location and sales order in appropriate places automatically. I would even be fine with being able to paste 10 rows from our production schedule into a sheet and run a script that would generate this information in the same format as the schedule in a row under each stock code until all of the parts were listed.

I am reaching out as a person eager to learn app script. I know a few things but I grew up on html. Javascript type language I never dived into much. Any help or advice would be greatly appreciated.

Thank you so much, Chad

I do have one basic sheet that I have been playing with but I am definitely open to other options

Continue reading...