Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

A metric imperial two field question

Featured Replies

I want to have two seperate fields for height -

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.

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.

  • Author

I'm now getting a circular definition frown.gif

Thanks for you suggestions I will pursue with it!

Charles

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

  • Author

Thank you very much the attachment, it was a great success. It works a treat!

Charles

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.