Guida alla sintassi "Get Value Labels".Ciao,
Sto sviluppando uno script che scorrerà le colonne nelle mie tabelle di dati e applicherà una supercategoria basata su un determinato insieme di etichette di valori. (Etichette di valore({0 = "Scarso", 25 = "Discreto", 50 = "Buono", 75 = "Molto buono", 100 = "Eccellente"}))
Ho bisogno di aiuto per ottenere la sintassi corretta nel mio codice non funzionante di seguito. Ho allegato anche alcuni dati di prova. Grazie in anticipo.
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} )}));
Automazione e scriptingConsumatori e ricerche di mercatoRi: Guida alla sintassi "Ottieni etichette di valore".Qualcun altro potrebbe avere una soluzione più elegante, ma l'esempio seguente funziona:
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
lst = char(col << Get Value Labels); //get col properties as string
if(contains (lst, "100 = \!"Excellent\!""), //see if 100 = "Excellent" is in the string
col << Set Property( "Supercategories", {Group( "Top 2", {75,100} ), Group( "Bottom 2", {25,0} )});
);
Ri: Guida alla sintassi "Ottieni etichette di valore".Sì, grazie, questo dovrebbe andare bene!