emcconnell Posted December 17, 2010 Share Posted December 17, 2010 Good Day All, I have a nightmare job that links to external data that contains step by step directional data for the specific recipient referenced in the main data file. I have successfully pulled the directions in, but as yet, I have been unable to find a way for the steps to be numbered as per client request. Any help from any of you FP Masters would be greatly appreciated. Code used is as follows returnStr = ''; if(FusionPro.Composition.isPreview == true || FusionPro.inValidation == true) Rule("OnRecordStart"); numRecsExtDF = externalDF.recordCount; for (recordWalker=1; recordWalker <= numRecsExtDF; recordWalker++) returnStr += externalDF.GetFieldValue(recordWalker, 'Manuever') + (') ') + externalDF.GetFieldValue(recordWalker, 'Narrative') + (' (') + externalDF.GetFieldValue(recordWalker, 'Distance') + (' mi)') + ('<br>') + ('<p findent="1800" lindent="3000">') return '<p findent="1800" lindent="3000">' + returnStr; Link to comment Share on other sites More sharing options...
Dan Korn Posted December 20, 2010 Share Posted December 20, 2010 You already have a counter. Just include it in the string you're building, like so: for (var recordWalker=1; recordWalker <= numRecsExtDF; recordWalker++) { returnStr += '<p findent="1800" lindent="3000">' + [i][b]recordWalker + ": " + [/b][/i] externalDF.GetFieldValue(recordWalker, 'Manuever') + ': ' + externalDF.GetFieldValue(recordWalker, 'Narrative') + ' (' + externalDF.GetFieldValue(recordWalker, 'Distance') + ' mi)\n'; } Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.