<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: &amp;quot;Get Value Labels&amp;quot; syntax help in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/quot-Get-Value-Labels-quot-syntax-help/m-p/634591#M83257</link>
    <description>&lt;P&gt;Someone else might have a more elegant solution, but the example below works:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;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 &amp;lt;&amp;lt; Get Value Labels); //get col properties as string
if(contains (lst, "100 = \!"Excellent\!""), //see if 100 = "Excellent" is in the string
	col &amp;lt;&amp;lt; Set Property( "Supercategories", {Group( "Top 2", {75,100} ), Group( "Bottom 2", {25,0} )});
	
);
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 23 May 2023 20:12:12 GMT</pubDate>
    <dc:creator>Jed_Campbell</dc:creator>
    <dc:date>2023-05-23T20:12:12Z</dc:date>
    <item>
      <title>"Get Value Labels" syntax help</title>
      <link>https://community.jmp.com/t5/Discussions/quot-Get-Value-Labels-quot-syntax-help/m-p/634570#M83255</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;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. &lt;EM&gt;(Value Labels({0 = "Poor", 25 = "Fair", 50 = "Good", 75 = "Very good", 100 = "Excellent"}))&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need help getting the syntax right in my non-working code below. I've attached some test data as well. Thanks in advance.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;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 &amp;lt;&amp;lt; Set Property( "Supercategories", {Group( "Top 2", {75,100} ), Group( "Bottom 2", {25,0} )}));&lt;/CODE&gt;&lt;/PRE&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;</description>
      <pubDate>Tue, 23 May 2023 19:05:00 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/quot-Get-Value-Labels-quot-syntax-help/m-p/634570#M83255</guid>
      <dc:creator>lilysecret</dc:creator>
      <dc:date>2023-05-23T19:05:00Z</dc:date>
    </item>
    <item>
      <title>Re: "Get Value Labels" syntax help</title>
      <link>https://community.jmp.com/t5/Discussions/quot-Get-Value-Labels-quot-syntax-help/m-p/634591#M83257</link>
      <description>&lt;P&gt;Someone else might have a more elegant solution, but the example below works:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;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 &amp;lt;&amp;lt; Get Value Labels); //get col properties as string
if(contains (lst, "100 = \!"Excellent\!""), //see if 100 = "Excellent" is in the string
	col &amp;lt;&amp;lt; Set Property( "Supercategories", {Group( "Top 2", {75,100} ), Group( "Bottom 2", {25,0} )});
	
);
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 23 May 2023 20:12:12 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/quot-Get-Value-Labels-quot-syntax-help/m-p/634591#M83257</guid>
      <dc:creator>Jed_Campbell</dc:creator>
      <dc:date>2023-05-23T20:12:12Z</dc:date>
    </item>
    <item>
      <title>Re: "Get Value Labels" syntax help</title>
      <link>https://community.jmp.com/t5/Discussions/quot-Get-Value-Labels-quot-syntax-help/m-p/637064#M83485</link>
      <description>&lt;P&gt;Yes, thank you, this should do nicely!&lt;/P&gt;</description>
      <pubDate>Tue, 30 May 2023 18:45:29 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/quot-Get-Value-Labels-quot-syntax-help/m-p/637064#M83485</guid>
      <dc:creator>lilysecret</dc:creator>
      <dc:date>2023-05-30T18:45:29Z</dc:date>
    </item>
  </channel>
</rss>

