<?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: Scripting column switcher using variable in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Scripting-column-switcher-using-variable/m-p/82249#M37092</link>
    <description>&lt;P&gt;That was the problem, thank you :)!&lt;/P&gt;</description>
    <pubDate>Thu, 01 Nov 2018 12:05:28 GMT</pubDate>
    <dc:creator>mes</dc:creator>
    <dc:date>2018-11-01T12:05:28Z</dc:date>
    <item>
      <title>Scripting column switcher using variable</title>
      <link>https://community.jmp.com/t5/Discussions/Scripting-column-switcher-using-variable/m-p/82234#M37082</link>
      <description>&lt;P&gt;I am scripting a dashboard with graph builder in it. I want to add a column switcher that should use a variable as a column list, due to changing columns. For some reason this doesn't work, only first column in a list will show. Column list is created like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;col_list3 = dt &amp;lt;&amp;lt; get column names(Numeric);

for (i = nitems(col_list3), i &amp;gt; 0, i--,

if (!contains(col_list3[i], "%"),

remove from(col_list3, i);

);

);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But when I try to use col_list3 in the Column Switcher embedded in dasboard script, it doesn't work.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Column Switcher(

 

:FC 1244%,

{col_list3}

)&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have tried to use eval ect., but no success. What am I missing, any Ideas? For some reason I can't add any files to this post so whole script pasted below and a image of my example data table.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="example image.JPG" style="width: 999px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/14172iF80A5B48F561D4C2/image-size/large?v=v2&amp;amp;px=999" role="button" title="example image.JPG" alt="example image.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names default to here (1);

dt = Data Table("example");

//get only columns with %
col_list3 = dt &amp;lt;&amp;lt; get column names(Numeric);
for (i = nitems(col_list3), i &amp;gt; 0, i--,
     if (!contains(col_list3[i], "%"),
           remove from(col_list3, i);
     );
);

//dashboard
JMP App(
	Set Name( "Dashboard" ),
	Set Description( "Selection in one report filters the second" ),
	Auto Launch( 1 ),
	Snap To Grid( 1 ),
	Show Grid( 1 ),
	Show Properties( 0 ),
	Show Sources( 1 ),
	Group By Category( 0 ),
	Dashboard Mode( 1 ),
	Parameters,
	Tables(
		DataTable1 = GuiTable(
			Set Path( "" ),
			Set Label( "example" ),
			Set Location( "Current Data Table" ),
			Set Invisible( 0 )
		)
	),
	Thumbnail(
		New Image(
			Char To Blob(
				"52417eJytVvs70w0b/262OSxzbBPDSActUz1Ccz7MISyHqRRbkuFFM5Upw8jhUUqodHBepaemzMhy3JorxxyaUjmHpHhJ1Gj07Hn/gvd6r/eHz/25Pvd9X/dP9/257ixvoquykrYSAADK7m7OvjJm/QMFmCyKbIO7ZAQ64+vqCDzpQc/KBCTMwcsBALg5cGkwVKYVY9wCzgAAQvgPQPzcyHlZDubu7ECKJ88XzfuRBnXbVlXWTM+u1Rc17hUfOd8fcRcVXfTgNlEnP1t81nfbg9R+yDa+9eclDKZXnU7QVHUmoJDv/PVOOaQo3GEJMQ1VVfAuW7vFGtyuseIzCcqVTnO+14P+vZpIbZ4cPaMf97NQZab4zAJ00rHMu7htcrbqfZQuj8fTTNlnYTGoFlY3JC+IX1s2JpRaJ/zItrD6yFd8/Pjxa7CBXh4wrODo6QYIA46wpqdDq2KrHMAE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e+9zK8edG+NY1rdKGX1ahSn0XItElD2kO4hgKLgvBxQGuuWAzbZdvPRvbrxfqX/Mol1NU3aZnHYupK0et/2T/qst2/z+s538p1HyBhhEiuH0Rj8Xhbv7nZi5fvuzm6ekcHFy26O7lle7Czo2kKhPggglKDJXqIlm8wFyaygrERu4kAx+nZc7wvRzo5zipY5SkFcC/ai/8+gH4+fm9zqQEBd2PwghPqOKLELYlh76Aqnm83Px8jRtRBwEylXt0j42N13v7biqPxMBisb42GaKJh6F+4Ji3fxQuLbWq30Wy3o3KpjuBFYit4EXsMW7chqH5oVawamcaRLVQf/OJiAh3suH17npw1b5ZISIpsqB8eFF/6Rx0HLs677kRI094TscXfYXb/ymniLHMA8xaUCicfRhGlTW2UKGATDqOx6ERYxMVLO+dzmo7pdUbnZ1KG1Cj2sRb0DJ+rexNAtwJROcnjidS/waEejzC",
				"base64compressed"
			),
			"png"
		)
	),
	Script(JSL Quote(// This script is executed when the application is run.
// Named objects have been created for the application modules
// (for example, "Module1") and the pre-defined object
// "thisApplication" refers to the application object itself.
// Variables and functions declared here are scoped to the
// Application namespace.

)	),
	Allocate(
		Module1 = Plan(
			PreAllocate,
			Script(JSL Quote(				thisModuleInstance &amp;lt;&amp;lt; Create Objects;				Try(MainTabPage &amp;lt;&amp;lt; Set Scriptable Object(thisApplication));			
)			),
			Allocate(
				DataFilterContext1 = Data Filter Context Box();
				MainTabPage = Tab Page Box();
				Splitter1 = H Splitter Box();
				DataFilterSource1 = Data Filter Source Box();
				TabPage1 = Tab Page Box();
				Scroll1 = Scroll Box();
				Report1 = Platform(
					DataTable1,
					Distribution(
						Automatic Recalc( 1 ),
						Nominal Distribution( Column( :Product ) )
					)
				);
				TabPage2 = Tab Page Box();
				Scroll2 = Scroll Box();
				Report2 = Platform(
					DataTable1,
					Graph Builder(
						Size( 534, 448 ),
						Show Control Panel( 0 ),
						Fit to Window( "Maintain Aspect Ratio" ),
						Variables( X( :DAY ), Y( :FC 1244% ) ),
						Elements( Points( X, Y, Legend( 3 ) ) ),
						Column Switcher(
							:FC 1244%,
							{col_list3} //not working
						)
					)
				);
			),
			Organize(
				Reparent( Scroll2( Report2 ) );
				Reparent( TabPage2( Scroll2 ) );
				Reparent( Splitter1( TabPage2 ) );
				Reparent( Scroll1( Report1 ) );
				Reparent( TabPage1( Scroll1 ) );
				Reparent( DataFilterSource1( TabPage1 ) );
				Reparent( Splitter1( DataFilterSource1 ) );
				Reparent( MainTabPage( Splitter1 ) );
				Reparent( DataFilterContext1( MainTabPage ) );
				Relocate( DataFilterContext1( 0, 0 ) );
			),
			Initialize(
				DataFilterContext1 &amp;lt;&amp;lt; Background Color( 2147483647 ),
				DataFilterContext1 &amp;lt;&amp;lt; Border(
					{Left( 0 ), Top( 0 ), Right( 0 ), Bottom( 0 )}
				),
				DataFilterContext1 &amp;lt;&amp;lt; Enabled( 1 ),
				DataFilterContext1 &amp;lt;&amp;lt; Horizontal Alignment( "Default" ),
				DataFilterContext1 &amp;lt;&amp;lt; Margin(
					{Left( 0 ), Top( 0 ), Right( 0 ), Bottom( 0 )}
				),
				DataFilterContext1 &amp;lt;&amp;lt; Padding(
					{Left( 0 ), Top( 0 ), Right( 0 ), Bottom( 0 )}
				),
				DataFilterContext1 &amp;lt;&amp;lt; Text Color( 2147483647 ),
				DataFilterContext1 &amp;lt;&amp;lt; Vertical Alignment( "Default" ),
				DataFilterContext1 &amp;lt;&amp;lt; Visibility( "Visible" ),
				MainTabPage &amp;lt;&amp;lt; Background Color( 2147483647 ),
				MainTabPage &amp;lt;&amp;lt; Border(
					{Left( 0 ), Top( 0 ), Right( 0 ), Bottom( 0 )}
				),
				MainTabPage &amp;lt;&amp;lt; Enabled( 1 ),
				MainTabPage &amp;lt;&amp;lt; Horizontal Alignment( "Default" ),
				MainTabPage &amp;lt;&amp;lt; Margin(
					{Left( 0 ), Top( 0 ), Right( 0 ), Bottom( 0 )}
				),
				MainTabPage &amp;lt;&amp;lt; Padding(
					{Left( 0 ), Top( 0 ), Right( 0 ), Bottom( 0 )}
				),
				MainTabPage &amp;lt;&amp;lt; Text Color( 2147483647 ),
				MainTabPage &amp;lt;&amp;lt; Vertical Alignment( "Default" ),
				MainTabPage &amp;lt;&amp;lt; Visibility( "Visible" ),
				MainTabPage &amp;lt;&amp;lt; Title( "Dashboard" ),
				MainTabPage &amp;lt;&amp;lt; Tip( "" ),
				MainTabPage &amp;lt;&amp;lt; Icon( "" ),
				MainTabPage &amp;lt;&amp;lt; Closeable( 0 ),
				MainTabPage &amp;lt;&amp;lt; Moveable( 0 ),
				Splitter1 &amp;lt;&amp;lt; Background Color( 2147483647 ),
				Splitter1 &amp;lt;&amp;lt; Border(
					{Left( 0 ), Top( 0 ), Right( 0 ), Bottom( 0 )}
				),
				Splitter1 &amp;lt;&amp;lt; Enabled( 1 ),
				Splitter1 &amp;lt;&amp;lt; Horizontal Alignment( "Default" ),
				Splitter1 &amp;lt;&amp;lt; Margin(
					{Left( 0 ), Top( 0 ), Right( 0 ), Bottom( 0 )}
				),
				Splitter1 &amp;lt;&amp;lt; Padding(
					{Left( 0 ), Top( 0 ), Right( 0 ), Bottom( 0 )}
				),
				Splitter1 &amp;lt;&amp;lt; Text Color( 2147483647 ),
				Splitter1 &amp;lt;&amp;lt; Vertical Alignment( "Default" ),
				Splitter1 &amp;lt;&amp;lt; Visibility( "Visible" ),
				Splitter1 &amp;lt;&amp;lt; Dockable( 1 ),
				Splitter1 &amp;lt;&amp;lt; Set Width( 1036 ),
				Splitter1 &amp;lt;&amp;lt; Set Height( 500 ),
				Splitter1 &amp;lt;&amp;lt; Set Sizes( {0.210067763794773, 0.789932236205227} ),
				Splitter1 &amp;lt;&amp;lt; set horizontal( 1 ),
				Splitter1 &amp;lt;&amp;lt; Set Min Size( 456, 193 ),
				Splitter1 &amp;lt;&amp;lt; Set Max Size( 60003, 30000 ),
				Splitter1 &amp;lt;&amp;lt; Set Auto Stretching( 1, 1 ),
				DataFilterSource1 &amp;lt;&amp;lt; Background Color( 2147483647 ),
				DataFilterSource1 &amp;lt;&amp;lt; Border(
					{Left( 0 ), Top( 0 ), Right( 0 ), Bottom( 0 )}
				),
				DataFilterSource1 &amp;lt;&amp;lt; Enabled( 1 ),
				DataFilterSource1 &amp;lt;&amp;lt; Horizontal Alignment( "Default" ),
				DataFilterSource1 &amp;lt;&amp;lt; Margin(
					{Left( 0 ), Top( 0 ), Right( 0 ), Bottom( 0 )}
				),
				DataFilterSource1 &amp;lt;&amp;lt; Padding(
					{Left( 0 ), Top( 0 ), Right( 0 ), Bottom( 0 )}
				),
				DataFilterSource1 &amp;lt;&amp;lt; Text Color( 2147483647 ),
				DataFilterSource1 &amp;lt;&amp;lt; Vertical Alignment( "Default" ),
				DataFilterSource1 &amp;lt;&amp;lt; Visibility( "Visible" ),
				TabPage1 &amp;lt;&amp;lt; Background Color( 2147483647 ),
				TabPage1 &amp;lt;&amp;lt; Border( {Left( 0 ), Top( 0 ), Right( 0 ), Bottom( 0 )} ),
				TabPage1 &amp;lt;&amp;lt; Enabled( 1 ),
				TabPage1 &amp;lt;&amp;lt; Horizontal Alignment( "Default" ),
				TabPage1 &amp;lt;&amp;lt; Margin( {Left( 0 ), Top( 0 ), Right( 0 ), Bottom( 0 )} ),
				TabPage1 &amp;lt;&amp;lt; Padding(
					{Left( 0 ), Top( 0 ), Right( 0 ), Bottom( 0 )}
				),
				TabPage1 &amp;lt;&amp;lt; Text Color( 2147483647 ),
				TabPage1 &amp;lt;&amp;lt; Vertical Alignment( "Default" ),
				TabPage1 &amp;lt;&amp;lt; Visibility( "Visible" ),
				TabPage1 &amp;lt;&amp;lt; Title( "Distributions" ),
				TabPage1 &amp;lt;&amp;lt; Tip( "" ),
				TabPage1 &amp;lt;&amp;lt; Icon( "Distrib" ),
				TabPage1 &amp;lt;&amp;lt; Closeable( 1 ),
				TabPage1 &amp;lt;&amp;lt; Moveable( 1 ),
				Scroll1 &amp;lt;&amp;lt; Background Color( 2147483647 ),
				Scroll1 &amp;lt;&amp;lt; Border( {Left( 0 ), Top( 0 ), Right( 0 ), Bottom( 0 )} ),
				Scroll1 &amp;lt;&amp;lt; Enabled( 1 ),
				Scroll1 &amp;lt;&amp;lt; Horizontal Alignment( "Default" ),
				Scroll1 &amp;lt;&amp;lt; Margin( {Left( 0 ), Top( 0 ), Right( 0 ), Bottom( 0 )} ),
				Scroll1 &amp;lt;&amp;lt; Padding( {Left( 0 ), Top( 0 ), Right( 0 ), Bottom( 0 )} ),
				Scroll1 &amp;lt;&amp;lt; Text Color( 2147483647 ),
				Scroll1 &amp;lt;&amp;lt; User Resizable( {1, 1} ),
				Scroll1 &amp;lt;&amp;lt; Vertical Alignment( "Default" ),
				Scroll1 &amp;lt;&amp;lt; Visibility( "Visible" ),
				Scroll1 &amp;lt;&amp;lt; Width( 218 ),
				Scroll1 &amp;lt;&amp;lt; Height( 474 ),
				Scroll1 &amp;lt;&amp;lt; Set Auto Scrollable( 1 ),
				Scroll1 &amp;lt;&amp;lt; Set Scrollers( 1, 1 ),
				Scroll1 &amp;lt;&amp;lt; Set Background Color( 2147483647 ),
				Scroll1 &amp;lt;&amp;lt; Set Show Empty( 0 ),
				Scroll1 &amp;lt;&amp;lt; Set Clip Printing( 0 ),
				Scroll1 &amp;lt;&amp;lt; Set Min Size( 72, 36 ),
				Scroll1 &amp;lt;&amp;lt; Set Max Size( 30000, 30000 ),
				Scroll1 &amp;lt;&amp;lt; Set Auto Stretching( 1, 1 ),
				Report1 &amp;lt;&amp;lt; Background Color( 2147483647 ),
				Report1 &amp;lt;&amp;lt; Border( {Left( 0 ), Top( 0 ), Right( 0 ), Bottom( 0 )} ),
				Report1 &amp;lt;&amp;lt; Enabled( 1 ),
				Report1 &amp;lt;&amp;lt; Horizontal Alignment( "Default" ),
				Report1 &amp;lt;&amp;lt; Margin( {Left( 0 ), Top( 0 ), Right( 0 ), Bottom( 0 )} ),
				Report1 &amp;lt;&amp;lt; Padding( {Left( 0 ), Top( 0 ), Right( 0 ), Bottom( 0 )} ),
				Report1 &amp;lt;&amp;lt; Text Color( 2147483647 ),
				Report1 &amp;lt;&amp;lt; Vertical Alignment( "Default" ),
				Report1 &amp;lt;&amp;lt; Visibility( "Visible" ),
				Report1 &amp;lt;&amp;lt; set horizontal( 0 ),
				TabPage2 &amp;lt;&amp;lt; Background Color( 2147483647 ),
				TabPage2 &amp;lt;&amp;lt; Border( {Left( 0 ), Top( 0 ), Right( 0 ), Bottom( 0 )} ),
				TabPage2 &amp;lt;&amp;lt; Enabled( 1 ),
				TabPage2 &amp;lt;&amp;lt; Horizontal Alignment( "Default" ),
				TabPage2 &amp;lt;&amp;lt; Margin( {Left( 0 ), Top( 0 ), Right( 0 ), Bottom( 0 )} ),
				TabPage2 &amp;lt;&amp;lt; Padding(
					{Left( 0 ), Top( 0 ), Right( 0 ), Bottom( 0 )}
				),
				TabPage2 &amp;lt;&amp;lt; Text Color( 2147483647 ),
				TabPage2 &amp;lt;&amp;lt; Vertical Alignment( "Default" ),
				TabPage2 &amp;lt;&amp;lt; Visibility( "Visible" ),
				TabPage2 &amp;lt;&amp;lt; Title( "TabPage2" ),
				TabPage2 &amp;lt;&amp;lt; Tip( "" ),
				TabPage2 &amp;lt;&amp;lt; Icon( "Trellis" ),
				TabPage2 &amp;lt;&amp;lt; Closeable( 1 ),
				TabPage2 &amp;lt;&amp;lt; Moveable( 1 ),
				Scroll2 &amp;lt;&amp;lt; Background Color( 2147483647 ),
				Scroll2 &amp;lt;&amp;lt; Border( {Left( 0 ), Top( 0 ), Right( 0 ), Bottom( 0 )} ),
				Scroll2 &amp;lt;&amp;lt; Enabled( 1 ),
				Scroll2 &amp;lt;&amp;lt; Horizontal Alignment( "Default" ),
				Scroll2 &amp;lt;&amp;lt; Margin( {Left( 0 ), Top( 0 ), Right( 0 ), Bottom( 0 )} ),
				Scroll2 &amp;lt;&amp;lt; Padding( {Left( 0 ), Top( 0 ), Right( 0 ), Bottom( 0 )} ),
				Scroll2 &amp;lt;&amp;lt; Text Color( 2147483647 ),
				Scroll2 &amp;lt;&amp;lt; User Resizable( {1, 1} ),
				Scroll2 &amp;lt;&amp;lt; Vertical Alignment( "Default" ),
				Scroll2 &amp;lt;&amp;lt; Visibility( "Visible" ),
				Scroll2 &amp;lt;&amp;lt; Width( 815 ),
				Scroll2 &amp;lt;&amp;lt; Height( 474 ),
				Scroll2 &amp;lt;&amp;lt; Set Auto Scrollable( 1 ),
				Scroll2 &amp;lt;&amp;lt; Set Scrollers( 0, 0 ),
				Scroll2 &amp;lt;&amp;lt; Set Background Color( 2147483647 ),
				Scroll2 &amp;lt;&amp;lt; Set Show Empty( 0 ),
				Scroll2 &amp;lt;&amp;lt; Set Clip Printing( 0 ),
				Scroll2 &amp;lt;&amp;lt; Set Min Size( 381, 167 ),
				Scroll2 &amp;lt;&amp;lt; Set Max Size( 30281, 30026 ),
				Scroll2 &amp;lt;&amp;lt; Set Auto Stretching( 1, 1 ),
				Report2 &amp;lt;&amp;lt; Background Color( 2147483647 ),
				Report2 &amp;lt;&amp;lt; Border( {Left( 0 ), Top( 0 ), Right( 0 ), Bottom( 0 )} ),
				Report2 &amp;lt;&amp;lt; Enabled( 1 ),
				Report2 &amp;lt;&amp;lt; Horizontal Alignment( "Default" ),
				Report2 &amp;lt;&amp;lt; Margin( {Left( 0 ), Top( 0 ), Right( 0 ), Bottom( 0 )} ),
				Report2 &amp;lt;&amp;lt; Padding( {Left( 0 ), Top( 0 ), Right( 0 ), Bottom( 0 )} ),
				Report2 &amp;lt;&amp;lt; Text Color( 2147483647 ),
				Report2 &amp;lt;&amp;lt; Vertical Alignment( "Default" ),
				Report2 &amp;lt;&amp;lt; Visibility( "Visible" ),
				Report2 &amp;lt;&amp;lt; set horizontal( 0 )
			)
		)
	),
	Initialize(
		Module1 &amp;lt;&amp;lt; Auto Launch( 1 );
		Module1 &amp;lt;&amp;lt; Set Module Type( "Report" );
		Module1 &amp;lt;&amp;lt; Set Window Title( "^TABLENAME - ^APPNAME" );
		Module1 &amp;lt;&amp;lt; Set Min Size( 0, 0 );
		Module1 &amp;lt;&amp;lt; Set Max Size( 30000, 30000 );
		Module1 &amp;lt;&amp;lt; Set Auto Stretching( ., . );
	)
) &amp;lt;&amp;lt; Run&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Nov 2018 07:19:11 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Scripting-column-switcher-using-variable/m-p/82234#M37082</guid>
      <dc:creator>mes</dc:creator>
      <dc:date>2018-11-01T07:19:11Z</dc:date>
    </item>
    <item>
      <title>Re: Scripting column switcher using variable</title>
      <link>https://community.jmp.com/t5/Discussions/Scripting-column-switcher-using-variable/m-p/82247#M37090</link>
      <description>&lt;P&gt;The issue you are having, is that when you specify&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Column Switcher(
:FC 1244%,
{col_list3}
)&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;you are placing col_list3 inside a set of {}.&amp;nbsp; But since col_list3 has been specified as a list, it already has the {} in the list.&amp;nbsp; So what JMP is seeing is a list within a list&lt;/P&gt;
&lt;P&gt;Here is a simple script to illustrate how to code what you want&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/semiconductor capability.jmp" );
col_list3 = dt &amp;lt;&amp;lt; get column names( Numeric );

For( i = N Items( col_list3 ), i &amp;gt; 0, i--,
	If( !Contains( col_list3[i], "PN" ),
		Remove From( col_list3, i )
	)
);

Graph Builder(
	Size( 534, 572 ),
	Show Control Panel( 0 ),
	Variables( X( :PNP1 ), Y( :NPN1 ) ),
	Elements( Points( X, Y, Legend( 3 ) ), Smoother( X, Y, Legend( 4 ) ) ),
	Column Switcher( :NPN1, col_list3 )
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Nov 2018 11:52:25 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Scripting-column-switcher-using-variable/m-p/82247#M37090</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2018-11-01T11:52:25Z</dc:date>
    </item>
    <item>
      <title>Re: Scripting column switcher using variable</title>
      <link>https://community.jmp.com/t5/Discussions/Scripting-column-switcher-using-variable/m-p/82249#M37092</link>
      <description>&lt;P&gt;That was the problem, thank you :)!&lt;/P&gt;</description>
      <pubDate>Thu, 01 Nov 2018 12:05:28 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Scripting-column-switcher-using-variable/m-p/82249#M37092</guid>
      <dc:creator>mes</dc:creator>
      <dc:date>2018-11-01T12:05:28Z</dc:date>
    </item>
    <item>
      <title>Re: Scripting column switcher using variable</title>
      <link>https://community.jmp.com/t5/Discussions/Scripting-column-switcher-using-variable/m-p/351724#M60120</link>
      <description>&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;&lt;EM&gt;Never mind, the variable was simply undefined in my local context!&lt;/EM&gt;&lt;/U&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;U&gt;&lt;EM&gt;Did not manage to remove this post...&lt;/EM&gt;&lt;/U&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Dear all,&lt;BR /&gt;&lt;BR /&gt;Facing the same issue, this solution does not solve my issue, supposedly because my columns have more complex names and the list variable contains quotes:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;colList = {"Time At Entrance Queue", "Time At Check-In", ...,
"Total Time From Last Chute To Exit", "EBS Total Duration", "Flight ID", "BAG ID", "PAX ID", "CheckInQueue", "CheckIn", "CheckInCollector", "TransferCollector", "Presortation", "Dep-Reader-TimeStamp", "ICS-Loader", "ICS-Unloader", "Last Chute", "MakeUp", "MakeUp Group", "Stopped", "Before WarmUp", "PBC Type", "Recirculation", "HBS_1_Index", "HBS_2_Index", "HBS_3_Index", "HBS_4_Index", "HBS_5_Index", "IntLnk", "MES_Index", "EBS_Index", "Transfer Infeed Desk", "Transfer Infeed Queue", "ORIGINATING", "HBS3-b", "MES-b", "EBS-b"};

In the following script, error marked by /*###*/
Column Switcher( :Total Time From CheckIn Collector To Exit, colList/*###*/ ),&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Any workaround of your knowledge?&lt;BR /&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Fri, 22 Jan 2021 14:50:47 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Scripting-column-switcher-using-variable/m-p/351724#M60120</guid>
      <dc:creator>HubP_SDe</dc:creator>
      <dc:date>2021-01-22T14:50:47Z</dc:date>
    </item>
    <item>
      <title>Re: Scripting column switcher using variable</title>
      <link>https://community.jmp.com/t5/Discussions/Scripting-column-switcher-using-variable/m-p/351774#M60124</link>
      <description>&lt;P&gt;I am assuming that your colList entry of ..., is a reference to more values follow, and not an actual entry.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You should try running with placing an Eval() function on the colList&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Eval( colList )&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 22 Jan 2021 14:55:05 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Scripting-column-switcher-using-variable/m-p/351774#M60124</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2021-01-22T14:55:05Z</dc:date>
    </item>
    <item>
      <title>Re: Scripting column switcher using variable</title>
      <link>https://community.jmp.com/t5/Discussions/Scripting-column-switcher-using-variable/m-p/351800#M60129</link>
      <description>Hi Jim,&lt;BR /&gt;Indeed, the list was much longer, just made it shorter.&lt;BR /&gt;&lt;BR /&gt;The original solution of this post finally worked fine, after I understood that my variable was not defined in the local context where I tried to use it ;)&lt;/img&gt;&lt;BR /&gt;&lt;BR /&gt;I just did not find how to remove my post after I found out :(&lt;/img&gt;&lt;BR /&gt;&lt;BR /&gt;Cheers!</description>
      <pubDate>Fri, 22 Jan 2021 16:23:31 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Scripting-column-switcher-using-variable/m-p/351800#M60129</guid>
      <dc:creator>HubP_SDe</dc:creator>
      <dc:date>2021-01-22T16:23:31Z</dc:date>
    </item>
  </channel>
</rss>

