I want to concatenate rows in a dataset. I came across same thing but it is for concatenating column - groupConcat. But I want to do it for rows.
You'll need to be a bit more descriptive about what you want to do.
I suggest giving an example: a sample input and a sample output always help to visualize what the goal is.
Ok, so I have a button, I have created a custom property - PATH_TAG
And I want to merge the 3 columns PRE, VAL, POST in a single column so that the resultant column will give me the concatenated path.
So after merge, the column should be like
[default]PROJ/OPC/EI-101BB/Value.value
[default]PROJ/OPC/EI-102BB/Value.value
[default]PROJ/OPC/EI-103BB/Value.value
[default]PROJ/OPC/EI-104BB/Value.value
So you DO want to group columns and not rows, unlike you said in the first post ?
I don't think you can do that with an expression, at least not the built-in ones.
If you can install @pturmel 's integration toolkit module, you'll probably find a way to do what you want with an expression.
If you can't, you'll have to use a script.
I'll give you an example later, I can't do that now.
If you don't want to do this in your database (where you can use is string concatenation), you will certainly want to use my Integration Toolkit's iteration functions. Your example would look like this:
unionAll(
asMap('combinedPath', 'str'),
forEach(
{Root Container.path.to.PATH_TAG},
asList(
concat(it()['PRE'], it()['VAL'], it()['POST'])
)
)
)