jwhittaker Posted March 26, 2012 Share Posted March 26, 2012 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. //OnJobStart 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 else 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.