In this article, we will look into how to convert rows to columns using an etext template. Usually, when we develop HCM Extract, there could be cases where there are multiple child rows for the same person and we need to pull them as separate columns or concatenate them at the template level so that each employee comes up on a single row. Ex: Extracting multiple payroll balances and converting them to different columns, extracting hiring managers/recruiters/collaborators for requisitions, and concatenating them to show up as a single column.
Consider we have a sample XML file like below:

Sample output file expected:
John ABC,100,XYZ,200,IJK,300
Jack DEF,100,MNO,200
Now, we will use the concatenate functionality in the etext template to achieve rows to columns functionality

Here the ConcatenatedInvoiceInfo is the name of the concatenation that is based out of the Ded_Details level and it is concatenating the Code and Value for each row found and the delimiter used is comma.
Once we develop this template, we can test this using the template viewer and as expected the template produces the output like below:

Hope this helps when you have to achieve such requirement.