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:
sourceRecord.properties.Description += "<br />"+data.extract(12,37,0,1,"");
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:
I am attaching a sample DataMapping config that you can examine for more information.MultiLine-Description.OL-datamapper (6.8 KB)