Jump to content

Suppress last line in Multiline Record or use that data


Recommended Posts


I am running Fusion Pro Creator 10.0.16 on a MAC. I have a .csv file with multiple lines per record and I am calling a new record every time the statement number changes.


I am having trouble getting data to show from the last line in the record from a field called AMOUNT-DUE. This field only has data in the last line of each record as a value showing all amount due on the invoice. However, I am seeing the date field from the last line in the record in my table.


What I am trying to do is suppress the last line in the table, but show the AMOUNT-DUE in a separate text frame at the bottom of the invoice.


Thanks in advance for your help!


Link to comment
Share on other sites

It's hard to say exactly what you need to do without seeing the job, or at the very least the data, but presumably you have some code that iterates through the multi-line records, something like this:

for (var r = 1; r <= XDF.recordCount; r++)
   // Add a table row, with values retrieved like so:
   // XDF.GetFieldValue(r, "SomeFieldNameHere")

So just iterate one fewer record:

for (var r = 1; r < XDF.recordCount; r++)


for (var r = 1; r <= XDF.recordCount - 1; r++)

Then you can do something like this to get the value from the last line of the multi-line record:

return XDF.GetFieldValue(XDF.recordCount, "AMOUNT-DUE")

And put that in your other frame.

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.

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...