Jump to content

Help:::: Stuck on Calculation Problem


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

Recommended Posts

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..... confused.gifconfused.gifconfused.gifconfused.gifconfused.gif

Link to comment
Share on other sites

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

Link to comment
Share on other sites

This topic is 6437 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.