2 Replies Latest reply on Apr 3, 2012 8:54 AM by patrick

    Substitute smart double quotes with straight double quote

    patrick

      Title

      Substitute smart double quotes with straight double quote

      Post

      Hi

      I'm trying to use the substitute function to straighten quotes in a text field. There is no problem using the substitute function to replace smart single quotes with the straight single quote of course but I cannot get it to replace smart double quotes with a straight double quote. In the replace part of the function I am using the backslash to escape the double quote so the replace looks like this: "\"" however FileMaker Pro won't work with that.

      So can anyone suggest a way of including the straight double quote in the substitute function, or maybe suggest another way to straighten double smart quotes.

      Thank you Smile

        • 1. Re: Substitute smart double quotes with straight double quote
          raybaudi

          Note that even smart quotes must be escaped in the calculation.

          Try:

          Substitute ( text ; [ "\“" ; "\"" ] ; [ "\”" ; "\"" ] )

          You could even use the Code ( ) function.

          • 2. Re: Substitute smart double quotes with straight double quote
            patrick

            Hi

            Thank you! This has worked. In fact when I read your suggestion I kicked myself for not having thought of it. The problem wasn't the straight double quote, but rather the unescaped smart quote earlier in the expression.

            I am marking a whole lot of stuff for some students I taught at a university and I use FMP for this (as well as many many other things). I have fields for the feedback which is normally a couple of paras and when I have finished it all I put it into a special webpage the uni has for submitting marks and feedback. I need to remove the smart quotes prior to putting the feedback into the text fields at the web page so that is what this is for.