<?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: Multiple Column Switchers in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Multiple-Column-Switchers/m-p/14040#M13172</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So, I've done this, but since the column names are rather long I can't get them to format correctly in my list box.&amp;nbsp; Do you know how to make them appear as they do in the column switcher?&amp;nbsp; (Firstpart....lastpart)?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 01 Sep 2015 14:45:07 GMT</pubDate>
    <dc:creator>msharp</dc:creator>
    <dc:date>2015-09-01T14:45:07Z</dc:date>
    <item>
      <title>Multiple Column Switchers</title>
      <link>https://community.jmp.com/t5/Discussions/Multiple-Column-Switchers/m-p/14038#M13170</link>
      <description>&lt;P&gt;Is there a way from preventing the same column from being picked when running multiple column switchers?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt = open("$SAMPLE_DATA/Candy Bars.jmp");
     biv = dt &amp;lt;&amp;lt; Bivariate(
            Y( :Saturated fat g ),
            X( :Sugars g ),
            SendToReport( Dispatch( {}, "Bivar Plot", FrameBox, {Frame Size( 593, 564 )} ) )
       );
     cs1 = biv &amp;lt;&amp;lt; Column Switcher(
            :Saturated fat g,
            {:Name( "Serving/pkg" ), :Calories, :Total fat g, :Saturated fat g,
            :Cholesterol g, :Sodium mg, :Carbohydrate g, :Dietary fiber g, :Sugars g,
            :Protein g, :Vitamin A %RDI, :Vitamin C %RDI, :Calcium %RDI, :Iron %RDI}
       );
     cs2 = biv &amp;lt;&amp;lt; Column Switcher(
            :Sugars g,
            {:Name( "Oz/pkg" ), :Calories, :Total fat g, :Saturated fat g,
            :Cholesterol g, :Sodium mg, :Carbohydrate g, :Dietary fiber g, :Sugars g,
            :Protein g, :Vitamin A %RDI, :Iron %RDI}
       );
     cs1 &amp;lt;&amp;lt; Run;
     cs2 &amp;lt;&amp;lt; Run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you let this run long enough eventually cs2 catchs up with cs1 and throws an error.&amp;nbsp; Since the columns are now the same, cs1 and cs2 lose their X/Y dependencies and now change both parameters.&amp;nbsp; Thus X=Y is now always true.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Anyone know any work around?&lt;/P&gt;</description>
      <pubDate>Wed, 30 Aug 2017 11:15:52 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Multiple-Column-Switchers/m-p/14038#M13170</guid>
      <dc:creator>msharp</dc:creator>
      <dc:date>2017-08-30T11:15:52Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple Column Switchers</title>
      <link>https://community.jmp.com/t5/Discussions/Multiple-Column-Switchers/m-p/14039#M13171</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is an irritating limitation of the column switchers.&amp;nbsp; The workaround is to not use column switchers but implement the functionality yourself using list boxes (or combo boxes).&amp;nbsp; Attach to these list boxes a script that will delete the bivariate plot and add create a new one based on the list box selections.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 31 Aug 2015 14:52:09 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Multiple-Column-Switchers/m-p/14039#M13171</guid>
      <dc:creator>David_Burnham</dc:creator>
      <dc:date>2015-08-31T14:52:09Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple Column Switchers</title>
      <link>https://community.jmp.com/t5/Discussions/Multiple-Column-Switchers/m-p/14040#M13172</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So, I've done this, but since the column names are rather long I can't get them to format correctly in my list box.&amp;nbsp; Do you know how to make them appear as they do in the column switcher?&amp;nbsp; (Firstpart....lastpart)?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Sep 2015 14:45:07 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Multiple-Column-Switchers/m-p/14040#M13172</guid>
      <dc:creator>msharp</dc:creator>
      <dc:date>2015-09-01T14:45:07Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple Column Switchers</title>
      <link>https://community.jmp.com/t5/Discussions/Multiple-Column-Switchers/m-p/14041#M13173</link>
      <description>&lt;P&gt;Actually I got the formatting to work using Col List Box function.&amp;nbsp; However, if anyone spent some time to try and create the custom play and stop button, YOU'D HAVE MY MANY THANKS!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here's the code I quickly made for the custom switchers where xcolumns and ycolumns are the list of columns wanted for switching through, and dt is the data table.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;xnlines = If(nitems(xcolumns) &amp;gt; 15, 15, nitems(xcolumns));
ynlines = If(nitems(ycolumns) &amp;gt; 15, 15, nitems(ycolumns));
vlb &amp;lt;&amp;lt; Append(hlb = Hlistbox(VlistBox(
     Text Box("Column X"),
     columnswitcherX = Col List Box(width(250), maxSelected(1), nlines(xnlines)),
     Text Box("Column Y"),
     columnswitcherY = Col List Box(width(250), maxSelected(1), nlines(ynlines)))));
columnswitcherX &amp;lt;&amp;lt; Append(xcolumns);
columnswitcherY &amp;lt;&amp;lt; Append(ycolumns);
columnswitcherX &amp;lt;&amp;lt; Set Selected(1);
columnswitcherX &amp;lt;&amp;lt; Set Script(
     bivcolx = columnswitcherX &amp;lt;&amp;lt; get selected;
     bivcoly = columnswitcherY &amp;lt;&amp;lt; get selected;
     try(interactivebiv &amp;lt;&amp;lt; Delete Box);
     hlb &amp;lt;&amp;lt; Append(interactivebiv = dt &amp;lt;&amp;lt; Bivariate( X( Column(dtinteractive, bivcolx) ), Y( Column(dtinteractive, bivcoly) ), Fit Line( {Line Color( {213, 72, 87} )} )) )
     );
columnswitcherY &amp;lt;&amp;lt; Set Script(
     bivcolx = columnswitcherX &amp;lt;&amp;lt; get selected;
     bivcoly = columnswitcherY &amp;lt;&amp;lt; get selected;
     try(interactivebiv &amp;lt;&amp;lt; Delete Box);
     hlb &amp;lt;&amp;lt; Append(interactivebiv = dt &amp;lt;&amp;lt; Bivariate( X( Column(dtinteractive, bivcolx) ), Y( Column(dtinteractive, bivcoly) ), Fit Line( {Line Color( {213, 72, 87} )} )) )
     );
columnswitcherY &amp;lt;&amp;lt; Set Selected(1);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 30 Aug 2017 11:16:49 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Multiple-Column-Switchers/m-p/14041#M13173</guid>
      <dc:creator>msharp</dc:creator>
      <dc:date>2017-08-30T11:16:49Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple Column Switchers</title>
      <link>https://community.jmp.com/t5/Discussions/Multiple-Column-Switchers/m-p/14042#M13174</link>
      <description>&lt;P&gt;Here's the buttons.&amp;nbsp; This uses Schedule() to run the animation and setIcon() to get the graphic.&amp;nbsp; the Write() statements should be replaced with the logic to change the variables.&amp;nbsp; The OnClose sets up the visible window to close the scheduler window when the visible window is closed.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="9673_buttons.png" style="width: 265px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/2125iD10CA6FC2D82696A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="9673_buttons.png" alt="9673_buttons.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;stop = 0; // animating state
loopFun = Function( {},
    If( !stop,
        Write( "go again\!n" ); // logic for animation
        Schedule( .5, loopFun() ); // continue the animation 1/2 second later
    )
);
New Window( "buttons",
    &amp;lt;&amp;lt;OnClose(stop=1;window("Scheduler")&amp;lt;&amp;lt;closewindow), // clean up when the window closes
    hlistbox(
        Button Box( "", 
            Write( "step forward\!n" ); // logic to step forward
        , 
            &amp;lt;&amp;lt;seticon( "StepForward" )
        ),
        Button Box( "", 
            Write( "step backward\!n" ); // logic
        , 
            &amp;lt;&amp;lt;seticon( "StepBackward" )
        ),
        Button Box( "",
            Write( "stop\!n" ); // stop the animation (reset start point?)
            stop = 1; // animating state
        ,
            &amp;lt;&amp;lt;seticon( "Stop" )
        ),
        Button Box( "",
            stop = 0; // animating state: if previously stopped, allow resume
            loopFun(); // kick off the animation
            window("Scheduler")&amp;lt;&amp;lt;minimizewindow; // hide the scheduler window
        ,
            &amp;lt;&amp;lt;seticon( "Go" )
        ),
        Button Box( "",
            Write( "pause\!n" ); // pause the animation (keep current position?)
            stop = 1; // animating state
        ,
            &amp;lt;&amp;lt;seticon( "Pause" )
        )
    )
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 30 Aug 2017 11:18:57 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Multiple-Column-Switchers/m-p/14042#M13174</guid>
      <dc:creator>Craige_Hales</dc:creator>
      <dc:date>2017-08-30T11:18:57Z</dc:date>
    </item>
  </channel>
</rss>

