mad_mickey Posted March 7, 2002 Posted March 7, 2002 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.
andygaunt Posted March 7, 2002 Posted March 7, 2002 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
ZuperZZ Posted March 7, 2002 Posted March 7, 2002 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
mad_mickey Posted March 11, 2002 Author Posted March 11, 2002 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!
falkaholic Posted March 11, 2002 Posted March 11, 2002 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 ]
Recommended Posts
This topic is 8297 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now