Hi gdwojo,

It seems like all informations are always in the same order. Your idea of finding specific strings of text is the right one.

You could create a global variable for each info you want to put in the table. Then, in a presstalk object, loop through each line of data to find the info you want to assign, using the "pos" presstalk command. For example, look for the string "QUANTITY" to start writing into your variable, and stop writing when you find the string "UNIT OF MEASURE".

Here is an example to get you started (I will not define local and global variables here and I assume there will be only 1 set of data per data page).
First, you want to find all relevant strings that will allow you to know where to start and finish reading to fill your variables. Here, we will find the line number and column number where each info starts.

  if(pos('UNIT OF MEASURE',@(&iLineCounter,1,999))>0)

Then, once you know on which line to find your infos and at which column they start, you can assign the data to the variables that will fill your table. You will want to determine for how many lines you will be writing data into the same variable by substracting the line number of the variable you are filling to the line number of the next info type:


Then you will do a "For Loop" with the resulting line amount to populate your variable


Repeat the last 2 steps for every single variable you want to populate (Lines to use+For loop to populate)
Please note that this code was not tested in PlanetPress and could contain minor syntax errors. This is only to show you the big picture of how this can be achieved using presstalk.
Also note that this code sample is "hardcoded" and will generate a lot of loops and presstalk. You could use functions and arrays to minimize the amount of code needed and prevent the same code to be repeated everytime for each "info type" you want to put in the table.

For more assistance please contact either our Support Department or our training department. You can also contact your sales rep if you would like us to do it for you via our professional services dept.

Thanks. Regards,