Jump to content

Search the Community

Showing results for tags 'code'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome
    • Start Here!
    • News
  • Software-Related Talk
    • Documentation
    • Getting Started
    • The JavaScript Library
    • FusionPro® VDP Creator
    • FusionPro® VDP Producer
    • FusionPro® VDP Server (API)
    • FusionPro® Expression®
    • MarcomCentral®
  • Support
    • Issues, Questions, Etc.
    • Digital Workflow Documents
    • Fonts
  • Off Topic
    • Customer Polls
    • Job Board (Moderated)
    • Reviews, Rants, and General Musings

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


About Me


Location


Occupation


FusionPro VDP software version


OS


Acrobat Version


Homepage


ICQ


AIM


Yahoo


MSN


Skype


User Title

Found 1 result

  1. I am referencing a list of addresses from an external data file. There are a few addresses in Massachusetts with leading zeros. Once the spreadsheet is put on MarcomCentral, the formatting defaults to drop leading zeros. The rule I wrote for this is below: var Address = ""; var Name = ""; var Street = ""; var City = ""; var State = ""; var Zip = ""; var Country = ""; myXDF= new ExternalDataFileEx("ATLocations.txt", "\t"); for (i = 1; i < myXDF.recordCount+1; i++) { FirstVar = myXDF.GetFieldValue(i, 0); { if (FirstVar==Field("Address")) { Name = myXDF.GetFieldValue(i, 1); Street = myXDF.GetFieldValue(i, 2); City = myXDF.GetFieldValue(i, 3); State = myXDF.GetFieldValue(i, 4); Zip = myXDF.GetFieldValue(i, 5); Country = myXDF.GetFieldValue(i, 6); } } } return ' | ' + City+", "+State+" "+FormatNumber("00000", Zip); The last part of the returned text is the zip code. In previous templates this seemed to work for me, but I am now getting different results, i.e." MA, 1913 00000" where it drops the leading zero and puts five zeros after the actual zip code. Finally, one extra item that we need to work. There are also Canadian addresses. Whatever rule(s) we use also needs to work for those locations. Now, the result looks like this: "Ontario, L6T 3V1 00000." Is the rule I have on the right track? Should the zip code part be left out and made into an independent rule? Any help is greatly appreciated. Thank you, Andy
×
×
  • Create New...