4 Replies Latest reply on Oct 12, 2016 1:10 PM by SEaton

    HTML email template include files wont show merge fields

    SEaton Rookie

      GMPE 2015.2.0.190

      When creating an email template and using "include files" feature to store, for example, footer information in a separate file, merge fields in the external file are not processed by goldmine when the template is loaded.

       

      When loaded, the field references are not replaced with the field values, but show up as <<contact2->ufieldname>> in the merged email.

       

      I opened a ticket with support, but Katie claims she's never heard of the ability to include external files in email templates.  I explained to her where to find this feature in the menu and she promptly closed the ticket. (?!)

       

      Will GM not process merge fields that are placed in an email from an external file?

       

      Thanks!

        • 1. Re: HTML email template include files wont show merge fields
          DHunt Specialist

          Probably because it should have been entered:

           

          <<&Contact2.uFieldName>>

           

          This also works in the Subject: as well.  I often use the iif() function in the Subject:.

          • 2. Re: HTML email template include files wont show merge fields
            SEaton Rookie

            Thanks, DJ!

             

            I tried changing from

            <<contact2->ufieldname>> to:

            <<&Contact2.uFieldName>> as you suggested and even

            <<&Contact2->uFieldName>> and

            <<Contact2.uFieldName>>

             

            ... but none of those are working for me.  When I "include a file" in an email template and the included file references fields formatted as above, the merged email still echos out <<&Contact2.uFieldName>>, but not the contact record value of that field.

             

            I also tried various file extensions on the include file in the event GM treated .htm, .html or .txt files differently, but that didn't make a difference either.

             

            The Goldmine template looks like this:

            <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
            <HTML><HEAD>
            <STYLE type=text/css> P, UL, OL, DL, DIR, MENU, PRE { margin: 0 auto;}</STYLE>

            <META name=GENERATOR content="MSHTML 11.00.9600.18450"></HEAD>
            <BODY leftMargin=1 rightMargin=1 topMargin=1><FONT size=2 face="Segoe UI">
            <DIV>&lt;&lt;CURSOR&gt;&gt; <BR>&lt;&lt;file:G:\Template\EmailFooters\Footer.txt&gt;&gt;</DIV></FONT></BODY></HTML>

            Even just placing one field in the Footer.txt file:

            <DIV>&lt;&lt;&amp;contact2.upmname&gt;&gt;</DIV>

            displays <<&contact2.upmname>> when the email is merged.

             

            Any suggestions?

             

            Thanks!

             

            ~shawn

            • 3. Re: HTML email template include files wont show merge fields
              DHunt Specialist

              Ah!  That might be the issue.  The Body of my GoldMine E-mail Template looks like this:

               

              <<file:C:\goldmine\html templates\Default\DJ - Statement Template.html>>

               


              All of my Coding is done in Dreamweaver, and I only Include the File in GoldMine.  You could use any HTML Editor.  Here's an example of what my Dreamweaver E-Mail Template looks like:


              Dear <<iif(.not. empty(&FirstName), &FirstName, &EmailAddress)>>,

               


              First, let me state that you would not be receiving this e-mail unless your account had already passed into a negative balance state.

               

              Run Date: <<&iif(month(date())=1, "January", iif(month(date())=2, "February", iif(month(date())=3, "March", iif(month(date())=4, "April", iif(month(date())=5, "May", iif(month(date())=6, "June", iif(month(date())=7, "July", iif(month(date())=8, "August", iif(month(date())=9, "September", iif(month(date())=10, "October", iif(month(date())=11, "November", iif(month(date())=12, "December", ""))))))))))))+" "+ltrim(str(day(date())))+", "+ltrim(str(year(date())))>>

               


              This statement is sent out automatically if you, or your authorized representative, have had any activity with us, and your GoldMine Support Account currently has a negative balance. This is also an example of GoldMine AP's in action.

              • 4. Re: HTML email template include files wont show merge fields
                SEaton Rookie

                Closing the loop on this, GM doesn't like the url encoded <<& >> characters to be in the external file, it wants them as they are. . 

                 

                As you stated in the beginning, instead of &lt;&lt;&amp;contact2.upmname&gt;&gt;

                in the external file, I needed to use:

                <<&Contact2.uFieldName>>

                 

                Thanks DJ!