Jump to content

Error renaming output file in OnNewOutputFile using FP7?

Recommended Posts

I have a document that was created in FusionPro 5 that in the OnNewOutputFile rule changes the name of the output file based on some fields in the data. It works just how we want. We upgraded the computer that runs this to 7.1P1c, and as far as I can tell it still works except that the message log returns this error just before composing the first record:


OnNewOutputFile, line 6: Error: In Field(), no data source defined or data could not be loaded


This is the code in OnNewOutputFile:

inFile = ToLower(FusionPro.Composition.outputFileName);
var i = inFile.lastIndexOf(".");
FileExt = Mid(inFile, i+1, 4);
if (!FusionPro.Composition.isPreview)
   FusionPro.Composition.outputFileName = Field("contract")+"_"+FormatDate(Today(), "mmdd")+"_"+Field("fundid")+FileExt; 


It didn't used to return an error, and the only thing that changed was upgrading from FusionPro 5 to 7. The output is still coming out as expected though, so I'm not sure what the problem is. Am I doing something wrong that FusionPro 7 is trying to warn me about?

Link to comment
Share on other sites


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

  • Create New...