<?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 Connecting table variable to slider box in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Connecting-table-variable-to-slider-box/m-p/275921#M53549</link>
    <description>&lt;P&gt;I have a table variable A that is connected to some formulas in my data table.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt = currentdatatable();
dt &amp;lt;&amp;lt; Set Table Variable( "A", 1 );&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I want to build an application using the Application Builder where I move a slider using the Slider Box and this updates my table variable A in the data table, i.e. if the slider is changed to 2, A is updated to 2 in the data table.&lt;/P&gt;&lt;P&gt;How could I connect those two? I know I can update a table variable using JSL:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt &amp;lt;&amp;lt; Set Table Variable( "A"), 2 );&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Is there a way of combining the running of a short script that updates the table variable when dragging the slider? I tried putting in the script in the Move-&amp;gt; Edit scripts under the Properties Window of the slider box&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt = Current Data Table();
dt &amp;lt;&amp;lt; Set Table Variable("A"), mySlider );&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;with Variable Name mySlider, but when running the Application, I get the error&amp;nbsp;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 376px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/24858i0A327D8A09FF2F6B/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: inherit;"&gt;when moving the slider, so I must be doing something wrong.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Any hints?&lt;/P&gt;</description>
    <pubDate>Fri, 09 Jun 2023 23:30:33 GMT</pubDate>
    <dc:creator>Feli</dc:creator>
    <dc:date>2023-06-09T23:30:33Z</dc:date>
    <item>
      <title>Connecting table variable to slider box</title>
      <link>https://community.jmp.com/t5/Discussions/Connecting-table-variable-to-slider-box/m-p/275921#M53549</link>
      <description>&lt;P&gt;I have a table variable A that is connected to some formulas in my data table.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt = currentdatatable();
dt &amp;lt;&amp;lt; Set Table Variable( "A", 1 );&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I want to build an application using the Application Builder where I move a slider using the Slider Box and this updates my table variable A in the data table, i.e. if the slider is changed to 2, A is updated to 2 in the data table.&lt;/P&gt;&lt;P&gt;How could I connect those two? I know I can update a table variable using JSL:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt &amp;lt;&amp;lt; Set Table Variable( "A"), 2 );&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Is there a way of combining the running of a short script that updates the table variable when dragging the slider? I tried putting in the script in the Move-&amp;gt; Edit scripts under the Properties Window of the slider box&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt = Current Data Table();
dt &amp;lt;&amp;lt; Set Table Variable("A"), mySlider );&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;with Variable Name mySlider, but when running the Application, I get the error&amp;nbsp;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 376px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/24858i0A327D8A09FF2F6B/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: inherit;"&gt;when moving the slider, so I must be doing something wrong.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Any hints?&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jun 2023 23:30:33 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Connecting-table-variable-to-slider-box/m-p/275921#M53549</guid>
      <dc:creator>Feli</dc:creator>
      <dc:date>2023-06-09T23:30:33Z</dc:date>
    </item>
    <item>
      <title>Re: Connecting table variable to slider box</title>
      <link>https://community.jmp.com/t5/Discussions/Connecting-table-variable-to-slider-box/m-p/275943#M53554</link>
      <description>&lt;P&gt;You have to use the Slider Box object in a window. The box has a script that is evaluated whenever the slider is changed. Use this script to change the table variable. Also, you can use the &amp;lt;&amp;lt; Set Table Variable message, or because table variables behave like columns in an expression (formula, script), you can simply and directly assign the new value.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This example should show you how to use a Slider box script.&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 = Open( "$SAMPLE_DATA/Big Class.jmp" );

dt &amp;lt;&amp;lt; New Table Variable( "Parameter", 1 );

New Window( "Sliding",
	Outline Box( "Control",
		Slider Box( 1, 10, p,
			dt:Parameter = p;
		)
	)
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 29 Jun 2020 12:37:06 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Connecting-table-variable-to-slider-box/m-p/275943#M53554</guid>
      <dc:creator>Mark_Bailey</dc:creator>
      <dc:date>2020-06-29T12:37:06Z</dc:date>
    </item>
    <item>
      <title>Re: Connecting table variable to slider box</title>
      <link>https://community.jmp.com/t5/Discussions/Connecting-table-variable-to-slider-box/m-p/275954#M53555</link>
      <description>That helped indeed! Thank you.</description>
      <pubDate>Mon, 29 Jun 2020 12:49:56 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Connecting-table-variable-to-slider-box/m-p/275954#M53555</guid>
      <dc:creator>Feli</dc:creator>
      <dc:date>2020-06-29T12:49:56Z</dc:date>
    </item>
  </channel>
</rss>

