I'm not sure I it does make sense on this side of the computer screen.
Where are these "drop-downs determine exactly which system the customer needs" located? In the portal or outside it?
I can think of multiple approaches here for setting this up. A script that runs through each drop down field, looks up the matching part number and determines the quantity needed, then enters it in the next row of the portal is one option. Other users have set up "kit" entries in their products database with a related "partlist" table that lists all the part numbers and quantities needed to assemble that kit. In those cases, you'd select a kit in your drop down and use a triggered script to copy the data from partlist into the portal.
The drop-downs are on the main [Orders] layout. I tried to post a picture but for some reason I can't..
Anyway, I have narrowed down the the drop-downs on the main layout. Now they just ask you whether the system being ordered:
needs tin or tile brackets
needs a tilt kit (yes or no)
and which size (out of 6 different sizes, ie. 1.5kW/2kW/3kW etc.)
A script then writes the correct system code into a field.
For example, a 1.5kW system with tin brackets gets the system code "1500", whereas the same system with tile brackets gets "1501".
Both variations consist of the exact same parts and quantities, except from one having 12 tile brackets and the other having 12 tin brackets.
The next size up, for example a 2kW system, is assigned the code "2000" if tin or "2001" if with tile. However, all parts in this system increase in quantity from the 1.5kW. Like 18 brackets instead of 12, 6 more rails etc etc etc.
Sorry if it is confusing, I will try and put up a picture if you want?!
The "kit" entries you descibed above could probably be perfect for my "system codes"..
How would I set this up though, would it be similar to the conditional value lists you helped me with in the other thread?
This method allows customers to purchase individual parts or a complete solar system "kit".
You should have a Products table where you list every part that can be used to construct one of your systems. You'd add Kit entries as additional Prdocut records in this table, but then add a new table, PartList with just three fields, KitID, PartID, Qty and relate them like this:
Products::ProductID = PartList::KitID
PartList::PartID = KitProducts::ProductID
This second relationship is optional, but you may find it useful, KitProducts is a second table occurrence of Products.
On a Products layout, you can add a portal to PartList and specify the partID's and quantities of each product that makes up your kit.
When you add an product to your line items portal, a triggered script would check to see if it is a kit. If it is, it uses Go To Related records to pull up the list of IDs and quantities and then loops through that list, using set variable and set field to move the data from the PartList table to the line item portal.
Ok, so I've now setup the PartList with the three fields and put it into the relationships:
Probably looks messy....
On my [Parts] form I have added the portal on the right:
Is this what you meant? So for each part (product) I choose a kit code in the drop-down and how many of this part goes into thathat kit? If this is correct I may need a little help with writing the script. I have had a go at it but I am sure it would take me a looong time to figure out lol.
Thanks for your help so far!
EDIT: Ooooh, light bulb moment! I think I had it back to front.. I have now, instead, gone into the "kit" products and setup the parts and quantities in that portal on the left that the kits consist of.. This makes more sense to me and I think that's what you meant..
Now I just need to figure out the script. Specifically I am thinking of how to copy the portal values. I am not really experienced with variables :(
I think I have worked it out now, thanks for all your help and patience ;)