November 20, 200322 yr Newbies 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
November 20, 200322 yr 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.
Create an account or sign in to comment