6 Replies Latest reply on Oct 27, 2016 2:34 PM by philmodjunk

    How do I apply a literal?


      How do I turn this: "<Accessorial chargecode=" & "P" & ">" & "<<" & GetValue ( $accessorial; $LineCount ) & ">>" & "</Accessorial>"


      Into this: <Accessorial chargecode= "P" >DST</Accessorial>


      FM will take the single quote ‘ but the XML won’t.


      FM won’t allow “”p””


      Any ideas?

        • 1. Re: How do I apply a literal?

          You can either escape the quote, as in:

          "<Accessorial chargecode= \"P\" >DST</Accessorial>"


          Or you can use the Quote() function, as in:

          "<Accessorial chargecode= " & quote("P") & " >DST</Accessorial>"


          That said, your original attempt would have worked if you used regular quotes instead of slanted ones, as in:

          "<Accessorial chargecode= ""P"" >DST</Accessorial>"

          3 of 3 people found this helpful
          • 2. Re: How do I apply a literal?



            I am going to move this thread from the FileMaker Community Feedback Space, which is specifically for input on the Community itself, to the Discussions Space where you should receive more views and potentially more advice on this topic!



            FileMaker, Inc.

            • 3. Re: How do I apply a literal?
              David Moyer


              this function might help:

              Substitute ( $rawText;

                ["<"; "&lt"];

                [">"; "&gt"];

                ["&"; "&amp"];

                ["\""; "&quot"];

                ["'"; "&apos"]


              p.s. this is for formatting the data inside the tags, not the entire xml file.  In other words, if you need < or > inside the tags, this function will allow it (along with the ampersand, single and double-quotes).

              • 4. Re: How do I apply a literal?

                Why do you add "<<" and ">>" ?

                • 5. Re: How do I apply a literal?

                  One more question, Im running windows 10 (i know i'm sinning)... the keyboard and window put the slanted " in the equation.


                  How do i manipulate it to do straight quotes and not the slanted or curly one?


                  The windows info on the internet is how to turn it off in one of thier programs. FM is not on the list! : )

                  • 6. Re: How do I apply a literal?

                    If you are entering this into a calculation dialog, you shouldn't need to.


                    For text fields and your layouts, there's an option in preferences for whether you enable "smart quotes".