Jaap Posted August 22, 2012 Share Posted August 22, 2012 I have created a FusionPro job. The OnJobStart rule is using an ExternalDataFileEx, which is set to ´FusionPro.Composition.inputFileName, "\t". It generates a 'Summary-sheet' of different values, generated from FieldValue from the database and is running perfectly. Uploaded the job to Marcom, where the inputFileName should be the uploaded database. Unfortunately, when running the preview, it does not recognize the Added Variables etc. I need this 'Summary-sheet' in the preview of the job. Any suggestions? Link to comment Share on other sites More sharing options...
Jaap Posted August 22, 2012 Author Share Posted August 22, 2012 Extra info to be clear: The uploaded database is used both as inputfile AND as External DataFile... Link to comment Share on other sites More sharing options...
Dan Korn Posted August 22, 2012 Share Posted August 22, 2012 Generally, if your question is specific to MarcomCentral, it should be asked in the MarcomCentral forum. That said, the problem is that MarcomCentral generates a tagged markup input file for preview, not a tab-delimited text file. So you can't open that tagged markup file with ExternalDataFileEx. However, in a MCC Preview, there's only one record of data anyway, so I'm not sure what kind of "summary-sheet" you're expecting to generate from that single record of data you're previewing. Link to comment Share on other sites More sharing options...
Dan Korn Posted August 22, 2012 Share Posted August 22, 2012 You could probably do something like this for your "summary:" var result = ""; for (var f in FusionPro.Fields) result += f + ": " + FusionPro.Fields[f] + "<br>\n"; return result; Link to comment Share on other sites More sharing options...
Jaap Posted August 22, 2012 Author Share Posted August 22, 2012 Thanks for the notes. The ´summary´-details I need is counting the number of records in a database for specific fields where it has a specific Value. Returning the totals. Link to comment Share on other sites More sharing options...
Dan Korn Posted August 22, 2012 Share Posted August 22, 2012 Thanks for the notes. The ´summary´-details I need is counting the number of records in a database for specific fields where it has a specific Value. Returning the totals. Well, like I said, there's only one record in the Preview, so that count won't be more than one anyway, but you could always use FusionPro.Fields to see whether that one record has the value you're looking for. Also, you can use the IsOnlinePreview() function to determine when you're running in a MarcomCentral Preview versus in FusionPro Creator (Desktop). Then you can do something like this: if (IsOnlinePreview()) { // Read from FusionPro.Fields } else { // Read from ExternalDataFileEx } Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.