Liz Posted August 6, 2003 Posted August 6, 2003 I have a field that is formatted to display as currency. I need to be able to, on rare occasion, enter a word. Is there any way to be able to do both?
rdhaden Posted August 7, 2003 Posted August 7, 2003 Make it a text field, and any calculations you need to do can be done with TexttoNum(field). Text to Num turns 600 into 600, Joe into nothing, Joe86 or 86Joe into 86, or J8a6 into 86, etc. It just ignores non-numeric characters.
-Queue- Posted August 7, 2003 Posted August 7, 2003 This is true with the caveat that it doesn't ignore 'Y', 'N', 'T', 'F', etc., depending on the language for the system setttings. TextToNum("N86") = 0, for example. So use TextToNum( "a" & fieldname ) to ensure the desired result.
rdhaden Posted August 7, 2003 Posted August 7, 2003 Interesting. It's not doing that for me. I can put Y,N,T,F,y,n,t,f anywhere in the text, even the beginning, and TexttoNum ignores it. I'm using FMP6 in OSX, and I'm speakin' American, by god! lol
-Queue- Posted August 7, 2003 Posted August 7, 2003 Well, I'll be danged, it looks like 5.5 has fixed this. That's nice to know. However, the single characters or words (y, n, t, f, yes, no, true, false) are still booleans. If you add at least one digit after them, then they work as desired. TextToNum( "N" ) = 0, TextToNum( "N1" ) = 1, whereas previously TextToNum( "N1" ) would result in 0. Anyway, if you're using at least 5.5, then you can forget what I said.
Recommended Posts
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