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.
How can I solve this problem?
You can stay with your two number fields...
Simply add these calculations into their option of Auto-Enter a calc:
For the Imperial field:
Get ( ActiveFieldName ) = "Metric" ; Metric/2.54 ;
For the Metric field:
Get ( ActiveFieldName ) = "Imperial" ; Imperial*2.54 ;
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?
Simply add these calculations into their option of Auto-Enter
You do not have to tranform the number field into a calculated field, but ONLY to modify its options.
I see, it works really well ^^