Hi everyone!
I am looking for a script that will pull the data table column names and if the column name starts with the word "Raw" to select and delete that column.
My script is attached below, but it has 2 issues that I cannot resolve.
1) The contains function only searches the column name for containing the string "Raw." Is there a way that I can specify to only select and delete the columns that START with the string "Raw"?
2) I get an error for the syntax I have used for deleting the column.
dt = Current Data Table()
ColNamesList = dt << Get Column Names;
Ncols = N Items(ColNamesList);
For(
i=1,
i<=NCols,
i++,
If(
Contains(Char(ColNamesList[i]), "Raw"),
dt << Delete Column(:Name(Char(ColNamesList[i])))
)
);Any help appreciated!
@Thierry_S provide you ith excellent suggestions. Also look up the character function Starts With(ColNameList[i], "Raw")
@Thierry_S provide you ith excellent suggestions. Also look up the character function Starts With(ColNameList[i], "Raw")