Newbies zstadel Posted November 20, 2003 Newbies Posted November 20, 2003 I'm trying to specify a calculation for a field (ExampleField) that contains data from a text field (MyTextField) but I want to replace any quote marks in MyTextField with the word " inches"... I would write it like this: ExampleField= Case(PatternCount(MyTextField, """)=1, " inches") But, of course, I get an error. Filemaker sees: Case(PatternCount(MyTextField, "" ")=1, " inches [a field] ") [expects a closing quote mark] I tried creating a global text field called QuoteMark containing a " and wrote the calculation as follows: ExampleField= Case(PatternCount(MyTextField, QuoteMark)=1, " inches") but that didn't work either. Anyone have any suggestions? Can I search by teh quote mark character's ASCII value? zack
BobWeaver Posted November 20, 2003 Posted November 20, 2003 You may have smart quotes turned on in the document preferences. There are 3 different double quotes, the plain one, the opening curly quote, and the closing curly quote, You are probably looking for the wrong one. You could try: Substitute(Substitute(Substitute(MyTextField,pQ,"inches"),ocQ,"inches"),ccQ,"inches") where pQ, ocQ and ccQ are globals which contain a plain quote, an open curly quote and closing curly quote respectively. Also, make sure that your globals are defined as text, not number.
Recommended Posts
This topic is 7744 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