I have a stacked data table with three columns that contain strings and another numeric.
A: unique identifier
B: text
C: text
As, Bs, Cs, Values
-----
A1, B1, C1, value11
A1, B1, C1, value12
A1, B1, C1, value13
A2, B2, C2, value21
A2, B2, C2, value22
A2, B2, C2, value23
Right now, I am creating a concatenated column with the form "A (B) [C]" which I split to have the final table like so:
A1 (B1) [C1], A2 (B2) [C2],
Value 11, Value 21
Value 12, Value 22
Value 12, Value 22
I want to create a new column property that saves the As in this final table.
Do I need a loop with two lists to insert this property column by column?
If I understand correctly what you want - You have the property value already in the column name so you can could get it from there:
Names Default To Here(1);
dt = New Table("Untitled",
Add Rows(3),
Compress File When Saved(1),
New Column("A1 (B1) [C1]",
Character,
"Nominal",
Set Values({"Value 11", "Value 12", "Value 13"})
),
New Column("A2 (B2) [C2]",
Character,
"Nominal",
Set Values({"Value 21", "Value 22", "Value 23"})
)
);
colNames = dt << Get Column Names("String");
For(i = 1, i <= N Items(colNames), i++,
aVal = Word(1, colNAmes[i]);
Column(dt, colNames[i]) << Set Property("A_property", aVal);
);