4 Replies Latest reply on Jun 8, 2016 3:02 PM by Thys Coetzee

    Stop PDM from stripping <> characters

    Thys Coetzee

      I have an XML file, an XML data card, all the attributes mapped and a nice SQL function that extracts a data set into a block of XML.

      The data is written correctly between the database and the data card, leaving the nicely formed XML in place.

      When the file attribute moves the block of XML from and edit field on the data card into the file schema, it wipes out the <> symbols and replaces them with &lt; and &gt; respectively, killing the XML schema.

      The correct structureMessed up text

      …             </TRNSaddress>

             </PPSdestination>

             <PPSDRAWINGS><PPSDRAWINGS>

        <PPSDRAWINGS>

          <Drwg_Number>116309</Drwg_Number>

          <Obj_RevisionNumber>0.01</Obj_RevisionNumber>

          <Obj_RevisionStamp>APPROVED FOR USE</Obj_RevisionStamp>

          <Drwg_L2>217 test part name</Drwg_L2>

          <Drwg_L3>217 test part BoM description</Drwg_L3>

        </PPSDRAWINGS>

        <PPSDRAWINGS>

          <Drwg_Number>116316</Drwg_Number>

          <Obj_RevisionNumber>0.01</Obj_RevisionNumber>

          <Obj_RevisionStamp>APPROVED FOR USE</Obj_RevisionStamp>

          <Drwg_L2>316 Obj_Name</Drwg_L2>

          <Drwg_L3>316 Obj_Description</Drwg_L3>

        </PPSDRAWINGS>

      </PPSDRAWINGS></PPSDRAWINGS></PPStransmittal>

                    </TRNSaddress>

             </PPSdestination>

             <PPSDRAWINGS>&lt;PPSDRAWINGS&gt;

        &lt;PPSDRAWINGS&gt;

          &lt;Drwg_Number&gt;116309&lt;/Drwg_Number&gt;

          &lt;Obj_RevisionNumber&gt;0.01&lt;/Obj_RevisionNumber&gt;

          &lt;Obj_RevisionStamp&gt;APPROVED FOR USE&lt;/Obj_RevisionStamp&gt;

          &lt;Drwg_L2&gt;217 test part name&lt;/Drwg_L2&gt;

          &lt;Drwg_L3&gt;217 test part BoM description&lt;/Drwg_L3&gt;

        &lt;/PPSDRAWINGS&gt;

        &lt;PPSDRAWINGS&gt;

          &lt;Drwg_Number&gt;116316&lt;/Drwg_Number&gt;

          &lt;Obj_RevisionNumber&gt;0.01&lt;/Obj_RevisionNumber&gt;

          &lt;Obj_RevisionStamp&gt;APPROVED FOR USE&lt;/Obj_RevisionStamp&gt;

          &lt;Drwg_L2&gt;316 Obj_Name&lt;/Drwg_L2&gt;

          &lt;Drwg_L3&gt;316 Obj_Description&lt;/Drwg_L3&gt;

        &lt;/PPSDRAWINGS&gt;

      &lt;/PPSDRAWINGS&gt;</PPSDRAWINGS></PPStransmittal>

       

      The red text is in a single edit field.  I want the edit field to leave my text alone-- noooo toucheee my stuffs!

      Any help would be most gratefully received.

      Regards,

      Thys

        • Re: Stop PDM from stripping <> characters
          Lee CS Young

          The only thing you're going to be able to do then is create additional variables and map them accordingly.

           

          Block Name: Drwg_Number

          Attribute: PPStransmittal/PPSDRAWINGS/PPSDRAWINGS/PPSDRAWINGS/Drwg_Number

           

          Do you need that many PPSDRAWINGS children of PPSTransmittal?

           

          EDIT: Come to think of it this won't work looking at your schema. Sorry. Enhancement request time, or, create an add-in to handle the formatting.

            • Re: Stop PDM from stripping <> characters
              Thys Coetzee

              If you mean the 2-deep PPSDRAWINGS, no I don't -- artifact of some other wrinkle, but not significant,  so a feasible (without the abovementioned wrinkle) schema would be as shown below, quite possibly skipping the outer grouping too.


              <transmittal>
              ...

                   <drwgchildren>

                       <drwg>

                             <element1>blehblehbleh</element1>

                             <element2>blehblehbleh</element2>

                             <element3>blehblehbleh</element3>

                       </drwg>

                       <drwg>

                             <element1>blehblehbleh</element1>

                             <element2>blehblehbleh</element2>

                             <element3>blehblehbleh</element3>

                       </drwg>

                       <drwg>

                             <element1>blehblehbleh</element1>

                             <element2>blehblehbleh</element2>

                             <element3>blehblehbleh</element3>

                       </drwg>

                   </drwgchildren>

              </transmittal>

               

              There could be from 1 to N drawings, so it is not practical to make variables -- the N+1 drawing would result in failure.

              What I need is a CAST for the PDM variable for UnicodeText in addition to Decimal, Integer, Date, Text and Boolean.