Jump to content

Record Count on Upload csv for variable product


jwhittaker

Recommended Posts

I have a variable postcard I need to put on a storefront, we are doing offline now. The lists we receive vary greatly in quantities from 100 to over 15,000. If the quantity is less than 200 we use a stamp and if it's over 200 we use an indicia. I have created 2 pages for the mailing side where one page has the stamp template and the other has an indicia template. Right now I have a drop down with "stamp" and "indicia" which uses the correct template page. I want to take that out of the customers hands for various reasons. I want to use the "recordCount" for external database files. My problem is that I don't know what the filename is or is going to be for the uploaded csv file to the variable product. Any help is appreciated.
Link to comment
Share on other sites

  • 5 months later...

One way I have been able to achieve this is to use the following in OnJobStart

//The following states that indicia IS greater than (or equal to) 200.

//Indicia will be either true or false

 

TotalRec = FusionPro.Composition.endRecordNumber - FusionPro.Composition.startRecordNumber;

indicia = TotalRec >= Int("200")

 

//if indicia is true:

if (indicia)

{

FusionPro.Composition.SetBodyPageUsage("IndiciaPage", true);

}

 

//if indicia is false

else

{

FusionPro.Composition.SetBodyPageUsage("StampPage", true);

}

 

They way I did it was not activating a different page, I was just using an image of the Indicia or Place Stamp Here, but it should work.

 

Hope this helps.

Link to comment
Share on other sites

I did get this to work. I can't see the indicia until all of the records get composed on the storefront. I wish I could see the indicia when I do the preview on the storefront though. This will make no indicia if it's less than 200, a first class if its 200-499 and a presort if its 500+. Here is my OnJobStart and my indicia Rules. Good luck.

//OnJobStart

 

var RecordCount = 0;

if (FusionPro.Composition.isBatch)

{

// MarcomCentral

RecordCount = Int(FusionPro.Composition.JobOptions["MCC_num_records"]);

}

else

{

// FP Desktop

RecordCount = new ExternalDataFileEx(FusionPro.Composition.inputFileName, ",").recordCount;

}

 

scIndicia = (RecordCount > 499);

fcIndicia = (RecordCount > 199);

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...