Returns the incoming table with an additional column showing values in two or more columns joined together with a specified delimiter character.
SppTableJoinColumns([Table Array],[Columns to Join],[Delimiter])
Where:
Table Array is a Table Array (such as the data in a standard table, or the result of a QueryDataValues function.
Columns to Join are the indexes of the columns to join as a pipebar (|) delimited string, for example 2|7|5. Number starting at 1 for the first column.
Delimiter is the delimiter to use when joining column values
Rule | Result | Meaning |
---|---|---|
SppTableJoinColumns(DwLookupPartDetails,"4|5","-") | {"Part" ,"Price" ,"Quantity" ,"Primary Color" ,"Secondary Color" ,"Primary Color-Secondary Color" ;"Casing" ,"210" ,"3" ,"Red" ,"Red" ,"Red-Red" ;"Side Panel" ,"85.4" ,"2" ,"Yellow" ,"Blue" ,"Yellow-Blue" ;"Railing" ,"499" ,"1" ,"Black" ,"Orange" ,"Black-Orange" ;"Frame" ,"387.9" ,"1" ,"Blue" ,"Teal" ,"Blue-Teal" ;"Support" ,"152.5" ,"2" ,"Blue" ,"Blue" ,"Blue-Blue" ;"Chassis" ,"1275.75" ,"1" ,"Black" ,"Black" ,"Black-Black"} | Will return an Array combining columns 4 and 5 into a new column using - to separate values. |
See Example Result Viewed as a Table below to see how the result of this example looks when viewed as a table.
The data below exists as a Table in DriveWorks named PartDetails (DwLookupPartDetails)
Part | Price | Quantity | Primary Color | Secondary Color |
---|---|---|---|---|
Casing | 210 | 3 | Red | Red |
Side Panel | 85.4 | 2 | Yellow | Blue |
Railing | 499 | 1 | Black | Orange |
Frame | 387.9 | 1 | Blue | Teal |
Support | 152.5 | 2 | Blue | Blue |
Chassis | 1275.75 | 1 | Black | Black |
The array returned by the rule SppTableJoinColumns(DwLookupPartDetails,"4|5","-") will look like:
Part | Price | Quantity | Primary Color | Secondary Color | Primary Color-Secondary Color |
---|---|---|---|---|---|
Casing | 210 | 3 | Red | Red | Red-Red |
Side Panel | 85.4 | 2 | Yellow | Blue | Yellow-Blue |
Railing | 499 | 1 | Black | Orange | Black-Orange |
Frame | 387.9 | 1 | Blue | Teal | Blue-Teal |
Support | 152.5 | 2 | Blue | Blue | Blue-Blue |
Chassis | 1275.75 | 1 | Black | Black | Black-Black |