mclisa81 Posted June 25, 2014 Posted June 25, 2014 (edited) I'm getting an error that I believe is related to the "&" ampersands in my external data. Incomplete entity definition TROUGH Unknown Entity &TROUGH; in record 169 From reading other posts, I'm pretty sure I need to insert the TaggedTextFromRaw function in my rule somewhere, so far everywhere I've tried has failed. returnStr = ''; if(FusionPro.Composition.isPreview == true || FusionPro.inValidation == true) { Rule("OnJobStart"); } numRecsExtDF = externalDF.recordCount; for (recordWalker=1; recordWalker <= numRecsExtDF; recordWalker++) { if (externalDF.GetFieldValue(recordWalker, 'Client No') == Field("Client No")) { returnStr += '<t>' + externalDF.GetFieldValue(recordWalker, 'Service Code') + '<t>' + externalDF.GetFieldValue(recordWalker, 'Service Name') + '<t>' + externalDF.GetFieldValue(recordWalker, 'Current Price') + '<t>' + externalDF.GetFieldValue(recordWalker, 'Price Effective 07/28/2014'); returnStr += '<br>'; } } return returnStr; Thanks in advance for any help Lisa FusionPro VDP software version 9.0.3 Windows 7 Acrobat Version Acrobat 9.x Edited June 25, 2014 by mclisa81 Removed my tagged text from rule Quote
dreimer Posted June 25, 2014 Posted June 25, 2014 You could just replace the "&" with "&" in your data and check the "Treat returned strings as tagged text" check box in your rule. Quote
mclisa81 Posted June 25, 2014 Author Posted June 25, 2014 Thanks for the quick response Don. I was trying to avoid going back to the data, unless I really needed to. I may have to do that if I can't get it to work with the rule. Thanks! Quote
dreimer Posted June 25, 2014 Posted June 25, 2014 Should be able to use a simple text editor and do a find and replace. Quote
mclisa81 Posted June 25, 2014 Author Posted June 25, 2014 That's probably the way I'll go since I'm on a tight schedule with this. I figured there may be a quicker way to do it in the rule so it would take care of any characters, not just ampersands. Just in case one of the thousands of errors that this 1 records threw, was for another problem character. Thanks again. Quote
dreimer Posted June 25, 2014 Posted June 25, 2014 Sorry can't help with the rule. I normally do this kind of work in the data since I am not a JavaScript guru!! Quote
Dan Korn Posted June 25, 2014 Posted June 25, 2014 The place to use TaggedTextFromRaw is around all the calls to get data from the external data file. Try this: if (FusionPro.inValidation) Rule("OnJobStart"); // load external data file var returnStr = ""; var numRecsExtDF = externalDF.recordCount; for (var recordWalker = 1; recordWalker <= numRecsExtDF; recordWalker++) { if (externalDF.GetFieldValue(recordWalker, 'Client No') == Field("Client No")) { returnStr += '<t>' + TaggedTextFromRaw(externalDF.GetFieldValue(recordWalker, 'Service Code')); returnStr += '<t>' + TaggedTextFromRaw(externalDF.GetFieldValue(recordWalker, 'Service Name')); returnStr += '<t>' + TaggedTextFromRaw(externalDF.GetFieldValue(recordWalker, 'Current Price')); returnStr += '<t>' + TaggedTextFromRaw(externalDF.GetFieldValue(recordWalker, 'Price Effective 07/28/2014')); returnStr += '<br>'; } } return returnStr; Quote
mclisa81 Posted June 25, 2014 Author Posted June 25, 2014 Worked perfectly! (ps - Thanks for cleaning up my code also!) Quote
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.