August 11, 200421 yr Hi everyone, I'm trying to create a packing list that its sectioned by Boxes and sub boxes. I will be shipping CDs, and each sub box will contain 10 of these. Each Box will contain a non-specific number of these sub boxes. Here is the format that I need the packing list to follow: Packing List SCOTUS Order Shipped 8/6/2004 BOX # 1 Sub-Box # 1 1
August 11, 200421 yr If Box# and Sub Box# are added as fields to the CD table, you can populate them (manually or with a script,) and use a layout with sub-summary parts to group the CDs into Boxes and Sub Boxes.
August 11, 200421 yr Author You know, sometimes I end up overcomplicating things in my mind and all it takes is for someone like yourself to point out the simple solution that was there all along. Thanks Ender. I will try that method out.
August 11, 200421 yr No problem. Just let us know if you get stuck. The part that I wasn't sure about is how you decide which CDs go in which boxes. If it's a matter of just putting the first 10 in the first box, then the next 10 in the next box, etc., then this could be scripted. If instead CDs end up in whichever box the warehouse (or you) throws them in, then this would be manually entered.
August 11, 200421 yr Author Yeah, actually the CDs would be placed into the sub-boxes in sequential order (267.773, 267.774, etc.). I'm very new to scripting, but I understand the concept. Would you have any tips for scripting this scenario? Thanks again.
August 12, 200421 yr I think this will work to number the LineItems; [From Invoice] Go to Related Records [ Show only related records ; table:LineItems ; Go to layout: LineItems ] Sort by Group_Reel# Loop Set Field [ LineItems::Box# ; Div(Get(RecordNumber);20) + 1 ]//Box limit is 20 Set Field [ LineItems::SubBox# ; Div(Get(RecordNumber);10) + 1 ]//SubBox limit is 10 Go to Record/Request/Page [ Exit after last ; Next ] End Loop If SubBox numbering should start at 1 at each new Box, then use this Set Field instead: Set Field [ LineItems::SubBox# ; Div(Div(Get(RecordNumber);10) + 1; Box#) ]//SubBox limit is 10 After using that script to number them, sort the records by Box# and SubBox#. Go to a list layout based on LineItems that has a Header (for the address and invoice info), a Sub-summary by Box# part, a Sub-summary by SubBox# part, a Body, and a Footer. Let me know how it goes. <Edit: changed Div() functions>
August 16, 200421 yr Author Hey Ender, It looks like I got the script working and it numbered the records beautifully! I'm still working on the Packing List layout, but I'm sure its just a matter of things being in the right place. Thanks again for all your help, this has taught me quite a bit.
Create an account or sign in to comment