Jump to content
Sign in to follow this  
Ryszard Gold

Converting g OR oz to ONE result feild.

Recommended Posts

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!

Share this post


Link to post
Share on other sites

How about something like:

Amount * Case (

Units = "g" ; 0.00220462262 ;

Units = "oz" ; 0.0625

)

Share this post


Link to post
Share on other sites

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!

Share this post


Link to post
Share on other sites

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)"?

Share this post


Link to post
Share on other sites

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!

Share this post


Link to post
Share on other sites

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
Sign in to follow this  

×

Important Information

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