8 Replies Latest reply on Jul 27, 2011 12:05 PM by raybaudi

# Can I create a non-fixed equation field?

### Title

Can I create a non-fixed equation field?

### Post

Just want to know is it possible to create a calculation field without a fixed equation?

Similar to excel's cell, when I type 2+2 and it will result as 4 in the cell.

Can this be done in FMP's field? So when I create a new record and key in different equation, the field will calculate it for me?

Pls comment.

• ###### 1. Re: Can I create a non-fixed equation field?

Yes.

Simply put this calculation in the auto-enter option of that field:

Evaluate ( Self )

• ###### 2. Re: Can I create a non-fixed equation field?

I put hise equation "Evaluate ( Self )" in the "Calculated Value" under Auto-Enter option.

But nothing happened.

Is there anything I did wrong?

• ###### 3. Re: Can I create a non-fixed equation field?

Also uncheck the box: Do not replace existing value for field ( if any ).

Now, if you write 2+1 into that field, clicking outside it will show: 3

• ###### 4. Re: Can I create a non-fixed equation field?

It works!!! Thank you~

• ###### 5. Re: Can I create a non-fixed equation field?

I have another question about this matter.

Since I put the equaiton "Evaluate (Self)" in the auto-enter option, when I type 1+2 in the field, the result is 3.

Here is my question:

Can I keep the formula visable when I go back to the field? Just like excel. When I enter a formula in an excle's cell, I can go back to that cell to check what formula that I entered.

Can I do that in FMP?

• ###### 6. Re: Can I create a non-fixed equation field?

You'd need to use two fields. Enter the expression in field 1 and use Field 2 to evaluate it. Field 2 would use Evaluate ( Field 1 ) instead of Evaluate ( self ). It can be a field of type calculation or it can be a number field with an auto-entered calculation.

• ###### 7. Re: Can I create a non-fixed equation field?

...or you can try this calculation:

Self & " = " & Evaluate ( Self )

• ###### 8. Re: Can I create a non-fixed equation field?

or even this one:

Let([
p = Position ( Self ; " =" ; 1 ; 1 ) ;
e = Left ( Self ; If ( p ; p - 1 ; Length ( Self ) ) )
];
e & " = " & Evaluate ( e )
)