Okay, this probably sounds like a really easy question, but I'm having a hard time with it.
So I have this data that is formatted like: (number)|(name)|(number)|(name)|(number).... etc. Well I have a loop that looks at the string, parses the information by the delimiter ('|') and then takes every other entry in that new list (all the "names") and puts only those in the new list. That new list is then used to create a whole bunch of columns. What I have discovered is that the numerical values that I then use from that string and place in each column is technically a character, so when I try to use a formula on the column, it just dots everything out. What I have to do is make a new column and use the formula on that column. My question is: I already have a list of all the column names I want, is there a way to create new columns with the same names and just replace the initial columns I make with the columns that can handle the format?
That question might be really weird, here is some of my script that handles the parsing/column making:
List = {};
// Iterate through the first rows of :Test_Result to get the pin names
one_test_result_list = words(column(dt2,"Test_Result")[1], "|");
For(j = 1, j <= nitems(one_test_result_list)/2, j++,
Assign(List, one_test_result_list[j*2]);
);
// Make new columns of the pin list
For(g = 1, g <= nitems(List), g++,
dt2 << New Column(List, Numeric, Continuous, Format("Best",12));
);
// Iterate through the rows of :Test_Result (where the string is stored)
For (i = 1, i <= nrows(dt2), i++,
one_test_result_list = words(column(dt2,"Test_Result"), "|");
For(k = 1, k < nitems(one_test_result_list)/2, k++,
// Store all the newly parsed results into new values
Column(dt2, List) = num(one_test_result_list[(k*2)+1]);
);
);
This works perfectly, I just found out about the whole making new columns thing... I want them to have the column names I already gave them, I just want to be able to put the format on them without every value turning into a dot. (I did test this on a new column and the values actually change correctly....)
Thank you so much!