
1. Re: Can you have more than one variable in a field calculation?
braxton Sep 4, 2012 3:45 PM (in response to fmpro_novice)You might consider nesting the functions inside one another or use the Case function.
What do you want to happen if FieldOne < FieldTwo, FieldA? You might try:
Field B =
Case(FieldOne = FieldTwo; FieldA1; FieldOne < FieldTwo; FieldA; FieldOne > FieldTwo; FieldA2; "")
I'm kind of a novice so test this out and read about "Case" from the link I provided.

2. Re: Can you have more than one variable in a field calculation?
philmodjunk Sep 4, 2012 4:14 PM (in response to fmpro_novice)I'm afraid that what you have written doesn't make sense to me.
Field B =
If ( FieldOne = FieldTwo; FieldA1; FieldA)
So, if B = 4, and FieldOne and FieldTwo have the same number input, then FieldA shows a 3  which is fine, that's what I'm after.
If Field B is a calculation field with this expression, You can't set B to be 4. If you meant that A = 4 and Fieldone = FieldTwo, then what you have posted makes sense.
Making the same changes here:
If ( FieldOne > FieldTwo; FieldA2; FieldA )
So, if A = 4, and Field One > Field Two, then Field B would show a 2.
Then the Case function already recommended should do the job
case ( Fieldone = Field2 ; FieldA  1;
FieldOne > Field2 ; FieldA 2 ;
FieldA )Note that with this expression B will show the value of A if FieldOne < Field2 That's the function of the last term shown in blue above.

3. Re: Can you have more than one variable in a field calculation?
fmpro_novice Sep 4, 2012 7:52 PM (in response to fmpro_novice)Hey Phil  This is one of those examples I was telling you about. If you saw the file for yourself, I could explain my issue much better.
Charlie

4. Re: Can you have more than one variable in a field calculation?
philmodjunk Sep 5, 2012 11:20 AM (in response to fmpro_novice)What you posted was impossible to set up in fileMaker without changes.