<?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: Column switcher and Graph Builder in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Column-switcher-and-Graph-Builder/m-p/906673#M106505</link>
    <description>&lt;P&gt;Has JMP become stricter?&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );

dt = Open( "$SAMPLE_DATA/Big Class.jmp" );

colLst = { :Height, :Weight, :Age };

// doesn't work
dt &amp;lt;&amp;lt; New Script( "test",
	Graph Builder(
    Variables( X( :Weight ), Y( :Height ) ),
    Elements( Points( X, Y ) ),
    Column Switcher( :Height, colLst )
	)
);

// does work
dt &amp;lt;&amp;lt; New Script( "test2",
	Graph Builder(
    Variables( X( :Weight ), Y( :Height ) ),
    Elements( Points( X, Y ) ),
    Column Switcher( :Height, { :Height, :Weight, :Age } )
	)
);

// does work
Eval( Eval Expr( dt &amp;lt;&amp;lt; New Script( "test3",
	Graph Builder(
    Variables( X( :Weight ), Y( :Height ) ),
    Elements( Points( X, Y ) ),
    Column Switcher( :Height, Expr( colLst ) )
	)
)));
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 09 Oct 2025 09:05:10 GMT</pubDate>
    <dc:creator>Ressel</dc:creator>
    <dc:date>2025-10-09T09:05:10Z</dc:date>
    <item>
      <title>Column switcher and Graph Builder</title>
      <link>https://community.jmp.com/t5/Discussions/Column-switcher-and-Graph-Builder/m-p/724491#M90704</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a number of columns which I have grouped together.&lt;/P&gt;&lt;P&gt;In the graph builder I have the X axis constant, but the Y axis should have the column switcher function where we can chose which parameter we want to switch between from the said group of columns.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;First I tell JSL what columns should be in the group and which column should be my first column&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;colList = dttable &amp;lt;&amp;lt; get column names( continuous );
	col1 = colList[1];&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;This is the code and the error I am getting,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Graph Builder(
	Size( 570, 621 ),
	Show Control Panel( 0 ),
	Show Legend( 0 ),
	Variables( X( :batch_no ), Y( :col1 ) /*###*/ ),
	Elements( Points( X, Y, Legend( 8 ) ) ),
	Column Switcher( :col1, {:colList} )
)&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you tell me what I should write for the Y variable so I can get the first column to start with and then add the column switcher.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;</description>
      <pubDate>Fri, 16 Feb 2024 10:33:36 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Column-switcher-and-Graph-Builder/m-p/724491#M90704</guid>
      <dc:creator>GgGgGg2024</dc:creator>
      <dc:date>2024-02-16T10:33:36Z</dc:date>
    </item>
    <item>
      <title>Re: Column switcher and Graph Builder</title>
      <link>https://community.jmp.com/t5/Discussions/Column-switcher-and-Graph-Builder/m-p/724503#M90707</link>
      <description>&lt;P&gt;You are specifying&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;:col1&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;The colon is telling JMP there is a column in the data table called "col1"(see scoping in JMP documentation);&amp;nbsp; Col1 is a memory variable, not a column.&amp;nbsp; Remove the colon and your code should work.&lt;/P&gt;</description>
      <pubDate>Fri, 16 Feb 2024 12:05:41 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Column-switcher-and-Graph-Builder/m-p/724503#M90707</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2024-02-16T12:05:41Z</dc:date>
    </item>
    <item>
      <title>Re: Column switcher and Graph Builder</title>
      <link>https://community.jmp.com/t5/Discussions/Column-switcher-and-Graph-Builder/m-p/724504#M90708</link>
      <description>&lt;P&gt;Hi Jim,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I get the graph now, but the column switcher still does not work.&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dtrelsplit &amp;lt;&amp;lt; Newscript ("graph",
	Graph Builder(
	Size( 570, 621 ),&lt;BR /&gt;
	Show Control Panel( 0 ),
	Show Legend( 0 ),
	Variables( 
		X( :batch_no ), 
		Y(col1), 			
		),
	Elements( Points( X, Y, Legend( 8 ) ) ),
	Column Switcher(
		col1, {colList}
	),
		
	),&lt;/CODE&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;BR /&gt;&lt;BR /&gt;Column Switcher cannot find specified column col1 in platform script&lt;CODE class=" language-jsl"&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;This is the error&amp;nbsp; shown&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 16 Feb 2024 12:11:11 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Column-switcher-and-Graph-Builder/m-p/724504#M90708</guid>
      <dc:creator>GgGgGg2024</dc:creator>
      <dc:date>2024-02-16T12:11:11Z</dc:date>
    </item>
    <item>
      <title>Re: Column switcher and Graph Builder</title>
      <link>https://community.jmp.com/t5/Discussions/Column-switcher-and-Graph-Builder/m-p/724513#M90714</link>
      <description>&lt;P&gt;Here are&amp;nbsp;my modifications&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Graph Builder(
	Size( 570, 621 ),
	Show Control Panel( 0 ),
	Show Legend( 0 ),
	Variables( X( &lt;SPAN class="lia-emoticons-autosuggestions"&gt;&lt;SPAN class="lia-emoticons-search-term"&gt;:batch_no&lt;/SPAN&gt;&lt;/SPAN&gt; ), Y( as column(col1) ) ),
	Elements( Points( X, Y, Legend( 8 ) ) ),
	Column Switcher( col1, colList )
		
)
;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;colList is a list, so it does not require a second set of {}&lt;/P&gt;</description>
      <pubDate>Fri, 16 Feb 2024 13:37:14 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Column-switcher-and-Graph-Builder/m-p/724513#M90714</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2024-02-16T13:37:14Z</dc:date>
    </item>
    <item>
      <title>Re: Column switcher and Graph Builder</title>
      <link>https://community.jmp.com/t5/Discussions/Column-switcher-and-Graph-Builder/m-p/724521#M90719</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&amp;nbsp;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 16 Feb 2024 14:32:49 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Column-switcher-and-Graph-Builder/m-p/724521#M90719</guid>
      <dc:creator>GgGgGg2024</dc:creator>
      <dc:date>2024-02-16T14:32:49Z</dc:date>
    </item>
    <item>
      <title>Re: Column switcher and Graph Builder</title>
      <link>https://community.jmp.com/t5/Discussions/Column-switcher-and-Graph-Builder/m-p/906673#M106505</link>
      <description>&lt;P&gt;Has JMP become stricter?&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );

dt = Open( "$SAMPLE_DATA/Big Class.jmp" );

colLst = { :Height, :Weight, :Age };

// doesn't work
dt &amp;lt;&amp;lt; New Script( "test",
	Graph Builder(
    Variables( X( :Weight ), Y( :Height ) ),
    Elements( Points( X, Y ) ),
    Column Switcher( :Height, colLst )
	)
);

// does work
dt &amp;lt;&amp;lt; New Script( "test2",
	Graph Builder(
    Variables( X( :Weight ), Y( :Height ) ),
    Elements( Points( X, Y ) ),
    Column Switcher( :Height, { :Height, :Weight, :Age } )
	)
);

// does work
Eval( Eval Expr( dt &amp;lt;&amp;lt; New Script( "test3",
	Graph Builder(
    Variables( X( :Weight ), Y( :Height ) ),
    Elements( Points( X, Y ) ),
    Column Switcher( :Height, Expr( colLst ) )
	)
)));
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 09 Oct 2025 09:05:10 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Column-switcher-and-Graph-Builder/m-p/906673#M106505</guid>
      <dc:creator>Ressel</dc:creator>
      <dc:date>2025-10-09T09:05:10Z</dc:date>
    </item>
    <item>
      <title>Re: Column switcher and Graph Builder</title>
      <link>https://community.jmp.com/t5/Discussions/Column-switcher-and-Graph-Builder/m-p/906697#M106509</link>
      <description>&lt;P&gt;What two versions of JMP are you referencing?&lt;/P&gt;</description>
      <pubDate>Thu, 09 Oct 2025 09:55:09 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Column-switcher-and-Graph-Builder/m-p/906697#M106509</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2025-10-09T09:55:09Z</dc:date>
    </item>
    <item>
      <title>Re: Column switcher and Graph Builder</title>
      <link>https://community.jmp.com/t5/Discussions/Column-switcher-and-Graph-Builder/m-p/906698#M106510</link>
      <description>&lt;P&gt;JMP19.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;edit: I wouldn't be able to tell without effort whether the colList variable worked in JMP18 or earlier. I am surprised because I have found several references regarding the use of variables having lists passed to them for further use.&lt;/P&gt;</description>
      <pubDate>Thu, 09 Oct 2025 10:07:43 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Column-switcher-and-Graph-Builder/m-p/906698#M106510</guid>
      <dc:creator>Ressel</dc:creator>
      <dc:date>2025-10-09T10:07:43Z</dc:date>
    </item>
    <item>
      <title>Re: Column switcher and Graph Builder</title>
      <link>https://community.jmp.com/t5/Discussions/Column-switcher-and-Graph-Builder/m-p/906801#M106519</link>
      <description>&lt;P&gt;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/15435"&gt;@Ressel&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Using a newly executed, therefore, clean instance of JMP 18, the example script you included of the case you implied was working for you in JMP 18 did not work for me.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The issue is because of the isolation that JMP provides for the sample script you included, where it has as the first line&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;This function isolates the variables created to be unique to that execution of the script.&amp;nbsp; Therefore, the variable collist is only known to the script when it is run.&amp;nbsp; When the embedded script that is saved to the data table is run, that is a new script environment, and it does not have the variable collist defined.&lt;/P&gt;
&lt;P&gt;The reason your two versions of the code that do execute properly, do actually work is because in the first case, the values are hardcoded into the script, and in the second case, the&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Expr( colLst ) &lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;expands the variable colist into hardcoded values before the code is executed, making the script embedded in the data table a hardcoded version of the script.&lt;/P&gt;
&lt;P&gt;Thus, in your case, JMP 19 has not changed from version 18&lt;/P&gt;</description>
      <pubDate>Thu, 09 Oct 2025 13:52:39 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Column-switcher-and-Graph-Builder/m-p/906801#M106519</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2025-10-09T13:52:39Z</dc:date>
    </item>
    <item>
      <title>Re: Column switcher and Graph Builder</title>
      <link>https://community.jmp.com/t5/Discussions/Column-switcher-and-Graph-Builder/m-p/906814#M106520</link>
      <description>&lt;P&gt;Ah, OK. I assume this is what is a "name space" issue?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also, I did not claim it worked for me in JMP18. I was wondering why the solution that was proposed here and looked so clear didn't work. I then incorrectly suspected it may be related to JSL's evolution. This is not the case.&lt;/P&gt;
&lt;P&gt;Thanks for the clarification!&lt;/P&gt;</description>
      <pubDate>Thu, 09 Oct 2025 14:20:09 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Column-switcher-and-Graph-Builder/m-p/906814#M106520</guid>
      <dc:creator>Ressel</dc:creator>
      <dc:date>2025-10-09T14:20:09Z</dc:date>
    </item>
    <item>
      <title>Re: Column switcher and Graph Builder</title>
      <link>https://community.jmp.com/t5/Discussions/Column-switcher-and-Graph-Builder/m-p/906817#M106522</link>
      <description>&lt;P&gt;great conversation : )&amp;nbsp;&lt;BR /&gt;magnifier glass on the nuts and bolts of JSL ...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I just wondered about the difference between &lt;FONT face="courier new,courier"&gt;Variables()&lt;/FONT&gt; and &lt;FONT face="courier new,courier"&gt;Column Switcher() in&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Variables( ... Y( as column(col1) ) ),
Column Switcher( col1, colList )
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This one works as well:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default to Here(1);
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
cols = dt &amp;lt;&amp;lt; get column names( continuous );

col1= cols[1];
gb = dt &amp;lt;&amp;lt; Graph Builder(
	Size( 437, 413 ),
	Graph Spacing( 4 ),
	Variables( X(col1 ), ),
	Elements( bar( X ), ),
	Column Switcher( col1, cols )
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;BR /&gt;as well as this one:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;
Names Default to Here(1);
dt = Open( "$SAMPLE_DATA/Big Class Families.jmp" );
cols = dt &amp;lt;&amp;lt; get column names( continuous, "String" );

col1= cols[1];
gb = dt &amp;lt;&amp;lt; Graph Builder(
	Size( 437, 413 ),
	Graph Spacing( 4 ),
	Variables( X(Column(col1) ), ),
	Elements( bar( X ), ),
	Column Switcher( col1, cols )
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;BR /&gt;what doesn't work:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default to Here(1);
dt = Open( "$SAMPLE_DATA/Big Class Families.jmp" );
cols = dt &amp;lt;&amp;lt; get column names( continuous, "String" );

col1= cols[1];
gb = dt &amp;lt;&amp;lt; Graph Builder(
	Size( 437, 413 ),
	Graph Spacing( 4 ),
	Variables( X(col1 ), ),
	Elements( bar( X ), ),
	Column Switcher( col1, cols )
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;so, &lt;FONT face="courier new,courier"&gt;Column Switcher()&lt;/FONT&gt; is fine with a &lt;FONT face="courier new,courier"&gt;String&lt;/FONT&gt;,&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;Variables()&lt;/FONT&gt; needs a &lt;FONT face="courier new,courier"&gt;name&lt;/FONT&gt;&amp;nbsp;- or&amp;nbsp; a &lt;FONT face="courier new,courier"&gt;column &lt;/FONT&gt;(created&amp;nbsp;via&lt;FONT face="courier new,courier"&gt; As Column()&amp;nbsp;&lt;/FONT&gt;or &lt;FONT face="courier new,courier"&gt;column()&lt;/FONT&gt;)&lt;/P&gt;</description>
      <pubDate>Wed, 07 Jan 2026 10:05:14 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Column-switcher-and-Graph-Builder/m-p/906817#M106522</guid>
      <dc:creator>hogi</dc:creator>
      <dc:date>2026-01-07T10:05:14Z</dc:date>
    </item>
    <item>
      <title>Re: Column switcher and Graph Builder</title>
      <link>https://community.jmp.com/t5/Discussions/Column-switcher-and-Graph-Builder/m-p/906833#M106524</link>
      <description>&lt;P&gt;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/26800"&gt;@hogi&lt;/a&gt;&amp;nbsp;is the meaning of your results that it is not an environment or name space issue, but something different?&lt;/P&gt;</description>
      <pubDate>Thu, 09 Oct 2025 14:58:45 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Column-switcher-and-Graph-Builder/m-p/906833#M106524</guid>
      <dc:creator>Ressel</dc:creator>
      <dc:date>2025-10-09T14:58:45Z</dc:date>
    </item>
    <item>
      <title>Re: Column switcher and Graph Builder</title>
      <link>https://community.jmp.com/t5/Discussions/Column-switcher-and-Graph-Builder/m-p/906835#M106526</link>
      <description>&lt;P&gt;No, the issue with the table scripts is a namespace issue, as&amp;nbsp;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/2687"&gt;@txnelson&lt;/a&gt;&amp;nbsp;explained.&lt;BR /&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;String&lt;/FONT&gt; vs. &lt;FONT face="courier new,courier"&gt;name&lt;/FONT&gt; vs. &lt;FONT face="courier new,courier"&gt;Column&lt;/FONT&gt; is just something else one can learn about.&lt;/P&gt;</description>
      <pubDate>Thu, 09 Oct 2025 15:06:27 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Column-switcher-and-Graph-Builder/m-p/906835#M106526</guid>
      <dc:creator>hogi</dc:creator>
      <dc:date>2025-10-09T15:06:27Z</dc:date>
    </item>
  </channel>
</rss>

