Jump to content

Record Count on Main Data File

Recommended Posts

I need to get a record count on a file so I can make decisions on which indicia to use. I have seen a few samples in the forum but can't make any work. Here is the code I have put into my rules.




var myNewFile = new ExternalDataFileEx(FusionPro.Composition.inputFileName, ",");


presortindicia = (myNewFile.recordCount > 499);

fcindicia = (myNewFile.recordCount > 199);


//Graphic rule

if (presortindicia)

return Resource("Presort FC SPEC 825.pdf"); //this file has been added as a resource


else if (fcindicia)

return Resource("Straight FC SPEC 825.pdf"); //this file has been added as a resource



return NullResource();


I put both, presortindicia and fcindicia in the JavaScript Globals

var fcindicia = "false";

var presortindicia = "false";


What am I doing wrong. Everything I have seen on this is talking about ExternalDataFiles, where you know the name, and not the main data file. Eventually this will go on a Marcom storefront and I wont know the name of the data file the client uploads.

I tried these threads:

Basic External Data File

External Data files record count



Thanks for the help.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...