billem Posted February 22, 2005 Share Posted February 22, 2005 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? Link to comment Share on other sites More sharing options...
Vaughan Posted February 22, 2005 Share Posted February 22, 2005 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. Link to comment Share on other sites More sharing options...
billem Posted February 22, 2005 Author Share Posted February 22, 2005 It is set to text. I've even tried changing the string to something like "this' is a test". still get 0 Link to comment Share on other sites More sharing options...
comment Posted February 22, 2005 Share Posted February 22, 2005 Position ( text ; "'" ; 1 ; 1 ) Link to comment Share on other sites More sharing options...
billem Posted February 22, 2005 Author Share Posted February 22, 2005 i am using a text field. I've even changed the string to something like " this ' is a test" and still get 0 returned Link to comment Share on other sites More sharing options...
billem Posted February 22, 2005 Author Share Posted February 22, 2005 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 Link to comment Share on other sites More sharing options...
RalphL Posted February 22, 2005 Share Posted February 22, 2005 Turn off smart quotes and re-enter the " & '. Link to comment Share on other sites More sharing options...
billem Posted February 22, 2005 Author Share Posted February 22, 2005 are you suggesting this: Position ( size; "&'"; 1 ; 1 ), which I just tried and got 0 Link to comment Share on other sites More sharing options...
RalphL Posted February 22, 2005 Share Posted February 22, 2005 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 ). Link to comment Share on other sites More sharing options...
billem Posted February 22, 2005 Author Share Posted February 22, 2005 thanks Ralph! Link to comment Share on other sites More sharing options...
Vaughan Posted February 22, 2005 Share Posted February 22, 2005 Well spotted Raplh. I gues you couls keep smart quotes as well by also looking for curly quotes as well as straight ones. Link to comment Share on other sites More sharing options...
Recommended Posts
This topic is 6604 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 accountSign in
Already have an account? Sign in here.
Sign In Now