Have a tricky datamapper.
The datamapper read’s out lines from a pdf.
Each line have several fields and one field (desription) can be on multiple lines
The extraction can be done with a normal extract and a repeat then i loks like this:
This gives me a challenge when I have to redesign the page i a detailed table.
As far as i know I can’t have a table with a row where i have multiple field’s and the on the same line a field from a detailed table in the same record.
Is there a way to combine all the (Description record lines) in the detalied table to a single field within the datamapper or is it posible to do that in the templage?
Start by creating a property named Description in the preprocessor step. Make sure its scope is set to Each record.
The process has two loops: one that reads all line items, and a nested one that reads multi-line descriptions. They will look something like this:
In the main loop, don’t extract the first line of the description. Instead, use an Action task to store its value in your Description property. Then, in the nested loop that reads the following description lines, replace your current Extract step with an Action step that appends each additional line to your Description property. The code would look something like this:
Notice how the code prepends a <br> element before each additional line in the description so that you get proper formatting in your template later on.
Finally, immediately after the nested loop has completed, add an Extract step that extracts the value stored in the Description property to a detail table field named Description. Make sure the Append values to current record option is ticked so that the process doesn’t create a brand new new detail record containing only the description:
Also tried to change you Datamapper in the inner loop to sourceRecord.properties.Description2
Then the Extract full description does not change to .Description2 in the Property list…
Is there a secret trick to this…
There’s no secret. you just have to create/change the Description property in the preprocessor step (which is the very first thing I mentioned in my previous reply):