6 Replies Latest reply on Jul 23, 2009 7:51 AM by TSGal

    Comments in calcs are escaped when they shouldn't be

    fitch

      Summary

      Comments in calcs are escaped when they shouldn't be

      Description of the issue

      This is a minor annoyance, but I think it qualifies as a bug: FileMaker Product(s) involved:FileMaker Pro 9.0v3Operating System(s) involved:Mac 10.5.5 / Windows tooDetailed description of the issue:Sometimes I want to type a formula into a script parameter, a variable, or a comment, etc.; essentially anywhere you can invoke the calculation engine. I escape my text as a comment, and that's all the calculation dialog contains: just a commented text block, no actual calculation. If my text contains quotes or other characters that are normally escaped in a calculation, they will be escaped; whereas normally text in comment blocks is not escaped.  Exact steps to reproduce the issue:1.Create a variable in a script.2. Put a comment in the text in the double-slash or slash-asterisk style. E.g.:  /* I am a "comment." */3. Click OKExpected Result: /* I am a "comment." */Actual Result: /* I am a \"comment.\" */Any workarounds that you have found:If you preface the comment block with a pair of empty quotes it will accept the calculation properly, e.g.:""  /* I am a "comment." */

        • 1. Re: Comments in calcs are escaped when they shouldn't be
          TSGal

          Fitch:

           

          I'm running 10.5.5, and I'm getting totally different results.  Here is what I did:

           

          In the Set Variable command, I clicked on Specify and entered:

          "/* I am a "comment." */"

          and I get "The specified table cannot be found"

           

          Since there are quotes in the string, I instead use:

          "/* I am a " & "\"" & "comment." & "\"" & "/*" 

           

          This works properly.

           

          I'm obviously missing a step here.

           

          TSGal

          FileMaker, Inc. 

          • 2. Re: Comments in calcs are escaped when they shouldn't be
            fitch
              

            When you type the comment, do not surround it with quotes.

             

            I.e.: /* like "this" */

            not: "/* like "this" */"

            • 3. Re: Comments in calcs are escaped when they shouldn't be
              TSGal

              Fitch:

               

              Sorry...  My bad.  I wasn't thinking of this as a comment per se, but as a calculation.

               

              I understand now, and I understand why it does this, so I have forwarded your entire post to our Software Quality Assurance (Testing) department asking for this to be changed.

               

              Thanks for taking the time to report this.

               

              TSGal

              FileMaker, Inc.

              • 4. Re: Comments in calcs are escaped when they shouldn't be
                fitch
                  

                Thanks TSGal. There are so many times when I just blow by a FileMaker annoyance, thinking "surely someone has reported this." But as the engineers remind us at DevCon, the more people report something, the higher priority it gets.

                 

                I must say I am loving this new forum. What a refreshing change to see FileMaker feedback and bug reports out in the open, and to have your reports acknowledged and discussed. 

                • 5. Re: Comments in calcs are escaped when they shouldn't be
                  hschlossberg
                    

                  Does it help get bugs fixed faster when more people chime in that something like this is a very annoying problem?  The original report was about 9.0v3, but this is still a problem in 10.0v3 (Windows XP).  And I'll just add that not only does everything get escaped, but all line spacing becomes FileMaker return characters, so that it is all just one big run-on sentence of a calc, which makes the commented calc difficult to read AND incorrect.

                   

                  For example, this:

                   

                   

                  /*

                  Let([

                  a = "Hello "; 

                  b = "World"]; 

                   

                  a & b

                  )

                  */

                   

                   

                  becomes:

                   

                  "/*¶Let([¶a = \"Hello \"; ¶b = \"World\"]; ¶¶a & b¶)¶*/"

                   

                  • 6. Re: Comments in calcs are escaped when they shouldn't be
                    TSGal

                    howards:

                     

                    Thank you for your post.

                     

                    Unfortunately, I I don't know what occurs when "more people chime in".  In any case, I have attached your post to the original case.

                     

                    TSGal

                    FileMaker, Inc.