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.

Strange Results with TexttoNum (FM 6)

Featured Replies

This is weird:

Create a text field, call it FieldA.

Create a calculation (number) call it Calc set it = texttonum(FieldA) -- just for kicks, set it to always calculate

Now,

Enter "A" into the fieldA, calc is blank

Enter "F" into fieldA, calc is 0

Enter "T" or "Y" into fieldA, calc is 1

I ran across this while testing for numbers in a string (if the string contains a numeric value, run scriptA, if not, run scriptB, etc etc ...) Anyway, I was getting strange behavior while testing since I had fieldA set to "test".

Couldn't find it listed as a bug anywhere, not sure what the deal is. Just thought it strange.

Jeff

True, False, T, F, Yes, No, etc. converts to 0 and 1 in versions prior to 7. The usual trick is to use something like TextToNum( "a" & field ) to avoid this issue.

And these results are also sensitive to the version you're using.

The french version would for ex. have a 1 for O, "Oui", V, "Vrai" and a 0 for F, "Faux", N, "Non"

I'd assume each language would have its own translation and shortcuts as well, so be careful to how far your solution can be distributed...

  • Author

Y'know, I knew that ... once. See what happens when you don't get enough sleep. Thanks!

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.