Sambo Posted November 13, 2002 Posted November 13, 2002 I want to have two seperate fields for height -
CobaltSky Posted November 13, 2002 Posted November 13, 2002 If you set up both fields as number fields, and define each of them (via the field definition options dialog) to auto-enter a value by calculation, specifying the calculation as the other field multiplied by the appropriate conversion factor, you will achieve what you want. With this arrangement, a value will be able to be entered into either field (metric or imperial) and when it is, the corresponding (converted) value will automatically appear in the other field.
kennedy Posted November 13, 2002 Posted November 13, 2002 Two problems with that, at least in v5.5: 1) Auto-enter calc's only fire when the field is empty... it won't reset a field with a value 2) FMP won't let you do what you said... it will complain of a circular definition Did you mean to auto-enter by lookup? That gets past problems 1 & 2... but I tried it, and can't seem to get the lookups to fire. I tried making the match field depend upon the two fields, but that didn't seem to get it moving.
Sambo Posted November 13, 2002 Author Posted November 13, 2002 I'm now getting a circular definition Thanks for you suggestions I will pursue with it! Charles
CobaltSky Posted November 14, 2002 Posted November 14, 2002 Yes. I'm afraid I omitted to mention that for one or both of the Auto Enter calculation formulae, you will need to specify the field using the GetField( ) function - that bypasses the circular definition error and forces the auto-enter to work in both directions. As Brian says, the auto-entry is a one-shot, and if you edit one of the values the other one won't update (unless you clear it first). In some situations this may not be a problem. If it is, then I suggest you turn the 'Allow entry into field' option off for both fields, and attach a script to each of them which clears the other field first then places the cursor into the field for editing. I've attached an example file which shows both methods in action, and includes examples of the scripts you'd need to use for the latter method. One compromise with this latter solution is that neither of the fields will be included in the tab order. If this is an issue then thre are a few other alternatives you might consider involving calculating fields, but have a look at the attached example first and see if there is something there you can use. Conversion.zip
Sambo Posted November 15, 2002 Author Posted November 15, 2002 Thank you very much the attachment, it was a great success. It works a treat! Charles
Recommended Posts
This topic is 8115 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now