February 22, 200520 yr I have a string in foot and inches, 2'-2 1/2", and want to use the position function to return the location of the ' character. I get zero and not 2. Why?
February 22, 200520 yr Post the exact function you are using. Is the field's data type set to text or number? It needs to be text for this to work.
February 22, 200520 yr Author It is set to text. I've even tried changing the string to something like "this' is a test". still get 0
February 22, 200520 yr Author i am using a text field. I've even changed the string to something like " this ' is a test" and still get 0 returned
February 22, 200520 yr Author i know that i am using the postion function correctly because if ask it to return the position of "a" in "this ' is a test", i get 11
February 22, 200520 yr Author are you suggesting this: Position ( size; "&'"; 1 ; 1 ), which I just tried and got 0
February 22, 200520 yr No, I am saying you must go to the File menu and select File Options, then Text and then unckeck the box that says "Use smart quotes" Now every place you used a " or a ' retype it. Your calculation should be Position ( String ; "'" ; 1 ; 1 ).
February 22, 200520 yr Well spotted Raplh. I gues you couls keep smart quotes as well by also looking for curly quotes as well as straight ones.
Create an account or sign in to comment