Skip to main content
Inspiring
January 30, 2007
Answered

zip code vs canadian postal code

  • January 30, 2007
  • 4 replies
  • 1226 views
<cf_cf_averyrtf labeltype="5160" labeltitle="Test Tag Generated from RTF VTM" fontsize="8">
<cfoutput query="drilldown">
<cf_cf_averycell zipcode="#HOME_ZIP_CODE#" stripblanklines="TRUE">

is in my form but the bar code is left out and an error is in its place that says "Invalid Zip Code!" when generating mailing labels. Help! Is there a different tag I should use as well as changing the field in the database?

Bob
    This topic has been closed for replies.
    Correct answer coldandconfused
    Thanks for your help! Here's what I did to the aver custom tag and it worked:

    <cfparam name="Attributes.barPos" default="" type="string">
    strCell.barpos = '';
    // output barcode on top if appropriate
    // if (len(trim(thisTag.assocAttribs[ii].zipCode)) AND thisTag.assocAttribs[ii].barPos EQ "top")
    // {
    // writeOutput("{\field\flddirty{\*\fldinst { BARCODE }{\lang1024\langfe1024\noproof #ThisTag.AssocAttribs[ii].zipcode#}{\\u }}{\fldrslt }}\par");
    // }

    // output barcode on bottom if appropriate
    // if (len(trim(thisTag.assocAttribs[ii].zipCode)) AND thisTag.assocAttribs[ii].barPos EQ "bottom")
    // {
    // writeOutput(" {\field\flddirty{\*\fldinst { BARCODE }{\lang1024\langfe1024\noproof #ThisTag.AssocAttribs[ii].zipcode#}{\\u }}{\fldrslt }}");
    // }

    Yah hey dere. We can send good-looking labels to Canada!

    Bob

    4 replies

    coldandconfusedAuthorCorrect answer
    Inspiring
    January 30, 2007
    Thanks for your help! Here's what I did to the aver custom tag and it worked:

    <cfparam name="Attributes.barPos" default="" type="string">
    strCell.barpos = '';
    // output barcode on top if appropriate
    // if (len(trim(thisTag.assocAttribs[ii].zipCode)) AND thisTag.assocAttribs[ii].barPos EQ "top")
    // {
    // writeOutput("{\field\flddirty{\*\fldinst { BARCODE }{\lang1024\langfe1024\noproof #ThisTag.AssocAttribs[ii].zipcode#}{\\u }}{\fldrslt }}\par");
    // }

    // output barcode on bottom if appropriate
    // if (len(trim(thisTag.assocAttribs[ii].zipCode)) AND thisTag.assocAttribs[ii].barPos EQ "bottom")
    // {
    // writeOutput(" {\field\flddirty{\*\fldinst { BARCODE }{\lang1024\langfe1024\noproof #ThisTag.AssocAttribs[ii].zipcode#}{\\u }}{\fldrslt }}");
    // }

    Yah hey dere. We can send good-looking labels to Canada!

    Bob

    Inspiring
    January 30, 2007
    strCell.barpos = 'bottom';

    top or bottom are my other chouces for the value. How do I make it null to kill the bar code?
    Inspiring
    January 30, 2007
    I'm not sure how to change it since I need it to be able to do USA and Canada Addresses. Will I have to comment out the bar code part of the tag?

    Bob
    Inspiring
    January 30, 2007
    Why don't you simply modify your copy of the custom tag?