AnsweredAssumed Answered

calculation with if and value list items

Question asked by ultraman on Jun 4, 2010
Latest reply on Jun 4, 2010 by ultraman

Title

calculation with if and value list items

Post

Hi. I'm obviously new to all that but i learn everyday.

 

I'd like to know if i can do this and if yes, what would be the good syntax.

 

In the same table, I have a value list called products_types and let's say there's 2 values in it: type A and type B. (drop-down)

 

And I have, for example, 4 fields with price values: price 1, price 2, price 3, price 4.

 

And finally a calculation field called Total.

 

What I want is that: 

 

If I choose type A in products_types, then total = price 1 + price 2

 

If I choose type B in products_types, then total = price 2 + price 3

 

And so on...

 

Is that possible?

 

Thanks

 

Outcomes