Ryszard Gold Posted January 18, 2009 Posted January 18, 2009 I am doing up a simple product database for a cleint that is selling cofee. He gets his products in grams and ounces, but need to feed it into a single feild so a further calculation can be run to calculate costs per pot and per cup. I would like to be able to the amount of the weight in, then select the type of weight (oz or g) then have it auto calculate that into lbs, but the key is that the result is to end up in the same feild. The calculations are easy, but setting it up to use one calculation when oz is selected, and another when g are used is what I'm having trouble with! Please help!
comment Posted January 18, 2009 Posted January 18, 2009 How about something like: Amount * Case ( Units = "g" ; 0.00220462262 ; Units = "oz" ; 0.0625 )
Ryszard Gold Posted January 19, 2009 Author Posted January 19, 2009 Thanks! I'm assuming I'll just introduce a "weights_unit" feild, then I'll place that statement in the feild where my exsisting lbs calculation is. I'll try it out!
comment Posted January 19, 2009 Posted January 19, 2009 I'm assuming I'll just introduce a "weights_unit" feild Uhm, don't you have one already? How else would you "select the type of weight (oz or g)"?
Ryszard Gold Posted January 19, 2009 Author Posted January 19, 2009 This was a change to an exsisting system, the client ended up wanting to be able to have multiple types of weights, so this was something I had to introduce. I'm going to try and implement this now!
Ryszard Gold Posted January 20, 2009 Author Posted January 20, 2009 This worked great, thanks! I also included changes for other measures as well!
Recommended Posts
This topic is 6142 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