Jump to content

This topic is 7535 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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

Posted

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.

Posted

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...

Posted

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

This topic is 7535 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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