I need to concatenate several columns from my TransView dataview into another column in a different dataview with each value separated by a comma. I need to suppress empty columns.
I’ve tried a few AI examples like so (in the Value field):
For the first column: ('{TransView.Col1}' ? '{TransView.Col1}' : '')
If the column holds a value, display the value, otherwise, add nothing.
For the second column: ('{TransView.Col2}' ? ( '{TransView.Col1}' ? ', ' : '' ) + '{TransView.Col2}' : '')
If the second column holds a value, check if the first column held a value, if so, add a comma and then the 2nd column’s value, otherwise, add nothing.
For the third column: ('{TransView.Col3}' ? ( '{TransView.Col1}' || '{TransView.Col2}' ? ', ' : '' ) + '{TransView.Col3}' : '')
If the 3rd column holds a value, then check if Column 1 or 2 held a value, if so, include a comma + Col3’s value, otherwise, add nothing.
This is brute force, evaluating each column and could get unwieldly if you’re concatenating many columns.