Field formula error message

Hello all,

I am having a problem with a computed field’s formula. I have 3 fields, let’s call them A, B and C. Field’s A & B are numeric (currency) and field C is numeric field (percent). By default field’s A & B contain $0. Field C’s formula reads:

@If(FieldA >0; 100;

@If(FieldB >0; 0;

FieldC))

When attempting to compose a document using this form I keep getting an error that reads:

Field: “FieldC”: Comparison operators must be supplied two values of the same data type.

Does anyone know why I am getting this message?

Thanks in advance

Subject: FYI - the easier way to compare…

Never use double @If’s when it’s possible to do it easier way.The right formula is :

@If(FieldA>100;100;FieldB>0;0;FieldC).

And, as you said - @ToNumber worked.

Subject: Field formula error message-UPDATE

Although my fields were numeric, I needed to use @ToNumber(FieldA)…@ToNumber(FieldB) etc.

I’m not sure WHY since the fields were already numeric with a default value of zero but…

Subject: RE: Field formula error message-UPDATE

Possibly because the computed field was above the other fields, and so being evaluated before those fields’ default formulas were evaluated.