cwolford Posted October 24, 2017 Share Posted October 24, 2017 Hello, 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! Clint Quote Link to comment Share on other sites More sharing options...
Dan Korn Posted October 25, 2017 Share Posted October 25, 2017 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++) Or: 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. Quote Link to comment Share on other sites More sharing options...
cwolford Posted October 26, 2017 Author Share Posted October 26, 2017 Dan, You're the man! Very helpful suggestions on both counts! Worked like a champ! Thanks so much! Clint Quote Link to comment Share on other sites More sharing options...
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.