Hello,
I am developing a script that will loop through the columns in my data tables, and will apply a supercategory based on a certain set of value labels. (Value Labels({0 = "Poor", 25 = "Fair", 50 = "Good", 75 = "Very good", 100 = "Excellent"}))
I need help getting the syntax right in my non-working code below. I've attached some test data as well. Thanks in advance.
Names Default To Here( 1 );
// Specify the column name
columnName = "36/5. Considering everything about the brand you use most often, how would you rate it overall?";
// Get the column reference
col = Column(columnName);
//test to see if the value labels contain 100 = "Excellent" and if so, apply a supercategory
if (Get Value Labels(col)["100"] == "Excellent",
col << Set Property( "Supercategories", {Group( "Top 2", {75,100} ), Group( "Bottom 2", {25,0} )}));