While this solution is not as flexible as that provided by Ernest you can perform the concatenation in a Transform node. I have provided the logic to name the output field to be the concatenation of the input field names but I do agree with Ernest that this may cause some issues with certain nodes or external systems.
#### ConfigureFields Script
#out1 += in1
## Create a list of the input field names
fldArray = []
for field in fields:
fldArray.append(field)
## Get the number of input fields
numFields = len(fldArray)
## Set the delimiter character
delim = ","
## Concatenate the fieldnames
all_fields = ','.join(fldArray)
## Output a field for the results with the concatenated fieldnames as its nane
out1[all_fields] = unicode
#### End ConfigureFields Script
#### ProcessRecords Script
#out1 += in1
## Set the output value to an empty string or the first value
if fields[fldArray[0]] is Null:
val = ""
else:
val = str(fields[fldArray[0]])
## If there are more fields the concatenate their values
if numFields > 1:
i = 1
while i < numFields:
if fields[fldArray[i]] is Null:
val = val + delim
else:
val = val + delim + str(fields[fldArray[i]])
i += 1
## Output the value
out1[all_fields] = val
#### End ProcessRecords Script
------------------------------
Adrian Williams
Precisely Software Inc.
------------------------------
Original Message:
Sent: 04-22-2024 03:54
From: Henrik B
Subject: concatenating N amount of columns and values comma separated
Hello, assume we have the input data as per below:

Image 1
Assume i want the input data represented as an output as below:

Image 2
Would this be possible to do for N amount of columns and N amount of data values, making it a generic solution without hardcoding each column name?
It would be nice to have this as a generic solution so i dont have to hardcode the column names i want to concantenate.
If a solution could be made, that is the same for 5,10,20 columns that gives me the output like in Image 2.
I can do this in a calculate fields node, with that said. I have to manually define each column i want to concantenate.
------------------------------
Henrik B
E.ON Sverige
------------------------------