writable if - otherwise calculate from another field
Hello,
I have a numeric field for a measurement in inches, and a second for a measurement in centimetres. When I enter one I would like it to auto-calculate the other. I tried a formula field but that works only if I consistently convert from one format.
So now I have a regular number field set to "writable if" to allow me to enter in one field if the other is null. I am having difficulty getting the next part (auto-calculate) to work. Should the command be a continuation of "writable if" or entered separately as a trigger? Also - what is the format of the command?
In summary, if the height_inches field is not null, then the height_cm field = height_inches * 2.54. And then the reverse.
Any advice is welcome. Thank you.
4 replies
-
The one issue I see, if you use the writable if, then once you fill in a number in any field it will fill in the other field and now both fields are not writable. Don’t know if that is how you want it but that is what will happen.
You can put the appropriate formula in the Trigger after update of each field. The formula is:
height_cm := height_inches * 2.54
-
Rachel Brodie said:
but if I enter numbers it reverts to “0” and there is no result in the inches field.I was trying “height_inches := height_cm / 2.54” in the inches field, which did not work.
Sound like you might have mixed up the formulas. I would look to make sure you are putting the correct formula in the correct trigger.
The trigger in the cm field should have:
inches field name :=
The trigger for the inches field should have:
cm field name :=
-
Fred - I did have them mixed up and thanks to your reply I now have both fields functioning. Thank you so much!
Content aside
- Status Answered
- 1 yr agoLast active
- 4Replies
- 109Views
-
2
Following