March 7, 200223 yr I have two related databases in my costings solution. My BOM database does a search in a costings database based on a search criteria. If the costings quantities for a certain part are, 1000, 2000, 4000 & 8000, how can I cost for a quantity of 5000? How would I write the script to find the next lowest break i.e. based on the costing quantity for 4000? An example script would be greatly appreciated. Thanks.
March 7, 200223 yr Hi mad_mickey. This file may help you. It uses a global field to hold the item number. This in turn is used in a self-join relationship to only show price breaks for that item. Then a global field to hold your actual quantity. Then a script runs to find the next lowest price break and copies the cost for that quantity value to a third global field. http://www.albion.co.uk/sample/costings.zip
March 7, 200223 yr hi Mike, I would use a field instead of a script to get the value. 1. Define a Relationship: "Cost" between BOM database and costings database based in the costs fields. 2. Define a number field: "cost_2" 3. In the field
March 11, 200223 yr Author Thanks for everyones help on this one but it suddenly came to me today how to sort this script as simply as possible. I set up a find on the costing quantities with the less than or equal to operator. The part in question was then sorted into quantities order (lowest to highest) and then I used the go to last record command. All seems to work well!
March 11, 200223 yr Didn't download Andy Gaunt's database but the way I'd do it is to have a global repeating field with all the values in there. An use GetRepitition to get the next highest of lowest. [ March 11, 2002, 10:11 AM: Message edited by: eric f ]
Create an account or sign in to comment