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.

Number fields recognize text

Featured Replies

I haven't seen this discussed anywhere, but it seems worthy of note.

Number fields in version 7 do not ignore text characters until a numeric calculation is performed on the field or it is referenced inside GetAsNumber. Length(numberfield) returns 4 for "0001" and "FRED", whereas previous versions would return 1 and zero. Left( numberfield; 1 ) returns "A" for "A12", versus "1" in previous versions. Length(GetAsNumber(numberfield)) and Left( GetAsNumber(numberfield); 1 ) produce results consistent with previous versions.

Once the number is added, multiplied, etc., then the characters are ignored, although if only text is in the field, it treats the number as zero instead of null. numberfield + 1 returns "1" for "ABE" instead of null.

This could cause problems for serial numbers or other fields defined as numbers that contain text which would previously have been ignored, depending on the type of calculations for which they are used. It is a nice feature where leading zeroes are concerned and surely can be utilized in other ways.

My only question now is how are number fields different from text fields, aside from how they sort?

>My only question now is how are number fields different from text fields, aside from how they sort?

Number fields do not accept return characters ....

There is an inconsistency between GetAsNumber() and properties of number fields. This is a bug worth to be reported ...

Just make some more tests, though ... "Y", "T" were interpreted in FMP 6 as 1, (yes, true), and "N", "F" as Zero. This has been changed in FMP 7. GetASNumber("true") returns nothing.

  • Author

Yes, I was aware that 'true' was no longer true. I just never saw anything regarding the new way number fields behave. Would you consider this a bug then?

True that number fields do not accept return characters, as long as they are manually entered. You can set a number field with return characters via script and use it for a multi-key relationship. Of course, there is a much smaller limit on indexing than there is with text fields.

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.