ronnie524 Posted June 12, 2004 Posted June 12, 2004 I have a fields with a sum of different values (e.g: FieldGTotal=field A+field B, where Field A,B,etc equals regular numbers. In one field I have a pop-up menu which gives me the option to choose the measurement unit used to calculate to Field B. : each, inches and yards. This is what I am trying to do:::::::::::::::::::::::::::::: FieldGTotal= Sum of all Fields if i chose "PCS" the calculation for the "FieldGTotal"="field A"+""field B"*1 (Field B= countable product ) if i chose "Inches" the calculation for the "FieldGTotal"="fieldA"+"field B"/36 (Field B= measurerable product)(result given in Yards) For Example Field A! Field B! Unit Measured Field! Gtotal Field 500 !72 !inches ! 1000 100 !5 !PCS ! 115 Do I have to make a separate database to put inches values and etc? What is the best solution for this? Please help.....
Steve T. Posted June 14, 2004 Posted June 14, 2004 Hi, ronnie! I'm not familiar with your terminology, but I think what you have would work using an IF statement or a CASE statement. I always find syntax a chore but it'd be something like... FieldGTotal = if (field B = "PCS", field A + field B, field A + (field B / 36)) or case (field B = "PCS", field A + field B, field B = "Inches", field A + (field B/36), 0) Anyway, the point is you can change the formula/equation depending upon the value of field B. Alternatively, you can create another field called "B converted" that would convert B to a base unit and then you could re-adjust the total to the appropriate unit from the field B selection. I many not be understanding your question correctly, though... but I hope this helps. --ST
ronnie524 Posted June 14, 2004 Author Posted June 14, 2004 Dear Steve T., Sorry about my terminology. thanks for the help... I see the the solution now... thanks for the help... that script should do the job .
Recommended Posts
This topic is 7728 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