
1. Re: Field Calculation problem~
goldensunflakes Apr 15, 2010 10:58 PM (in response to Ray)If I understand you right, this is how I did this for a feet/meter conversion for my database.
You need four fields.
The first one is lenght_n (number; where someone enters the length)
The second is lengthUnit_t (text; where options from a value list allow "imperial" or "metric"
The third one is lengthMetric_c (a calculation; If(lengthUnit_t ="imperial"; length_n *.304799;length_n)
the fourth is lenghtImperial_c (a calculation; If(lengthUnit_t ="metric"; length_n *3.28084;length_n)
a person enters in the length and the unit using the first two fields and the alternative lengths are calculated by the last two. You could combine the last two fields into a single field using a series of if statements.

2. Re: Field Calculation problem~
raybaudi Apr 16, 2010 12:33 AM (in response to Ray)
Ray wrote:How can I solve this problem?
You can stay with your two number fields...
Simply add these calculations into their option of AutoEnter a calc:
For the Imperial field:
Case(
Get ( ActiveFieldName ) = "Metric" ; Metric/2.54 ;
Self
)For the Metric field:
Case(
Get ( ActiveFieldName ) = "Imperial" ; Imperial*2.54 ;
Self
) 
3. Re: Field Calculation problem~
Ray Apr 17, 2010 5:57 PM (in response to Ray)Dear Daniele
May I ask what is the meaning "ActiveFieldName" in
Case(Get ( ActiveFieldName ) = "Metric" ; Metric/2.54 ;Self) ?
Besides, if I choosing the field type in "calculation", I still can not type the number in this field. Are there something I misunderstanding?
Thanks,
Ray

4. Re: Field Calculation problem~
raybaudi Apr 18, 2010 2:47 AM (in response to Ray)
raybaudi wrote:Simply add these calculations into their option of AutoEnter
You do not have to tranform the number field into a calculated field, but ONLY to modify its options.

5. Re: Field Calculation problem~
Ray Apr 18, 2010 11:26 AM (in response to Ray)I see, it works really well ^^
thanks,
Ray