Hello,
I frequently receive multi-punch data "exploded" into separate columns, where a positive response for option 1 = 1, option 2 = 2, etc.. I have to recode these to binary and I'd like to have this in a reproducable script. I think I'm on the right track with the following script, but I get the error "object not subscriptable{1} in access or evaluation of 'Subscript'" when I run it. I've attached a sample data set. Thanks in advance.
dt = Current Data Table();
lstColNames = {"14_1","14_2","14_3","14_4","14_5","14_6","14_7","14_8","14_9","14_10","14_11","14_12","14_13"};
For Each Row( For( i = 1, i <= N Items( lstColNames ), i++, If( lstColNames[i][]== i, lstColNames[i][] = 1 ) ) );