How do you count number of rows in a lined table and combine multi-lined text?


I have a lined table and in the column 'DESCRIPTION', there are multi-lined descriptions. These are meant to be combined with the description above into 1 cell. Could I find out 

  • How do I do a count of what is the total number of rows in a table, so as to run a For Loop?

Currently what I used is Dim iCount As Integer = Context.Field("LinedTable").Items.Count which does not seem to get the total number of rows in this table. Subsequently with the right conditions, I would append the description to the cell above. e.g. Context.Field("DESCRIPTION").Items.Item(i - 1).Text += strDescription

  • Would there be a better way to merge these multi-lined description together?

(N.B. I have selected 'DESCRIPTION' as the master row in Flexi-Layout Studio instead of selecting 'TOTAL' as the master row as there are product categories that fall in the 'DESCRIPTION' column, which I do not want to merge together with the other descriptions)

I am writing this script on the Administrator Station, in Document Definition and under Rules.

Have been stuck on this issue for very long, so any help or codes to guide me would be very much appreciated.

Thank you very much! 






Please sign in to leave a comment.