Jump to content

Find - Next Lower Value


This topic is 7168 days old. Please don't post here. Open a new topic instead.

Recommended Posts

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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!

Link to comment
Share on other sites

This topic is 7168 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.