Jump to content

Listing using External Data File


ssidata

Recommended Posts

Good Morning.

 

Working on a project that requires listing a code on a letter that utilizes an external data file. While I am able to list the code on one column, I would like to be able to list the code over multiple columns. So if I have five codes to list, it will appear like so:

 

******X ******X

******X

******X

******X

 

If I have 12 codes to list from the external data it will appear like so:

 

******X ******X ******X

******X ******X ******X

******X ******X ******X

******X ******X ******X

 

So as you can see, I will not always have the same number of codes to list for each record and since there are paragraphs immediately after I list these codes, the amount of space I have is limited.

 

Is there some kind of "counter", if you will, that I can use in Fusion Pro that will tell it to start a new column if it reaches a certain number? Any direction/instruction would be greatly appreciated! :)

Link to comment
Share on other sites

Below is the code I am using to list the codes. The codes are showing in one columm. I would like them to overflow to the next column if there is more than 4 codes to list for each column. Thanks for any help. :):D

 

if(FusionPro.inValidation)

Rule("OnJobStart");

var myTable = '<table columns=4><column width=9000><column width=9000><column width=9000><column width=9000><alignment="left"';

myTable += '<margins = "top:0;bottom:0;left:0;right:0">';

myTable += '<drawbrule = "false">'

var numRecsExtDF = externalDF.recordCount;

for (recordWalker=1; recordWalker <= numRecsExtDF; recordWalker++)

{

if (externalDF.GetFieldValue(recordWalker, 'letterid') == Field("letterid"))

{

myTable += '<row><cell>' + NormalizeEntities(externalDF.GetFieldValue(recordWalker, 'coid'))

 

}

}

myTable += '</table>';

return myTable;

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...