<?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: How to use variable selected in combo box into data extraction path in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/How-to-use-variable-selected-in-combo-box-into-data-extraction/m-p/362144#M61183</link>
    <description>&lt;P&gt;Sweet, works nice.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any chance I could use combo box and get&amp;nbsp; outcome as a number&lt;SPAN style="font-family: inherit;"&gt;?&lt;/SPAN&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );

New Window( "Combo box test", 
	&amp;lt;&amp;lt; Modal,
	Panel Box( "Select a Date Range",
		Lineup Box( N Col( 1 ), 
			Text Box( "DCOP ID" ), 
			dc_cb = Combo Box(
				{"10", "20", "30"},
				dc_cb &amp;lt;&amp;lt; GetSelected(),
				&amp;lt;&amp;lt; Set Width( 20 )
			)
		), 
		H List Box(
			Button Box( "OK",
				&amp;lt;&amp;lt;Set Function(
					Function( {self}, 

						//Insted "10" as text will need 10 as number???
						dcop_id = dc_cb &amp;lt;&amp;lt; Get ;
					)
				)
			),
			Button Box( "Cancel" )
		), 
	),
);
//dcop_id is an number
Write( "\\S:data\ENG_" || dcop_id || ".CSV" );&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 24 Feb 2021 12:04:58 GMT</pubDate>
    <dc:creator>swiergi11</dc:creator>
    <dc:date>2021-02-24T12:04:58Z</dc:date>
    <item>
      <title>How to use variable selected in combo box into data extraction path</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-use-variable-selected-in-combo-box-into-data-extraction/m-p/360799#M61034</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I'm quite new to JMP, got script with combo box and intending to use that selected character to be insert into the&amp;nbsp; path for&amp;nbsp; data&amp;nbsp;&lt;SPAN style="font-family: inherit;"&gt;extraction , any suggestion welcome .&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks&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 );
Clear Symbols();
Clear Globals();

New Window( "Combo box test", 
	&amp;lt;&amp;lt; Modal,
	Panel Box( "Select a Date Range",
		Lineup Box( N Col( 1 ), 

			Text Box( "DCOP ID" ), 
			
			dc_cb = Combo Box(
				{"CED15_10", "CDM45.10", "CRL02.05", "CEM11.05", "CEM09.18", "CBI07.01"},
				dc_cb &amp;lt;&amp;lt; GetSelected(),
				&amp;lt;&amp;lt; Set Width( 20 )
			), 
		,
		), 
		H List Box(
			Button Box( "OK",
				&amp;lt;&amp;lt;Set Function(
					Function( {self}, 

						dcop_id = dc_cb &amp;lt;&amp;lt; Get;

					)
				)
			),
			Button Box( "Cancel" )
		), 

	),

);

dt_control = Open( "\\S:data\ENG_" || dcop_id || ".CSV" );&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 09 Jun 2023 22:06:26 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-use-variable-selected-in-combo-box-into-data-extraction/m-p/360799#M61034</guid>
      <dc:creator>swiergi11</dc:creator>
      <dc:date>2023-06-09T22:06:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to use variable selected in combo box into data extraction path</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-use-variable-selected-in-combo-box-into-data-extraction/m-p/360884#M61044</link>
      <description>&lt;P&gt;The message Get returns an integer from the combobox, I think you instead want Get Text.&amp;nbsp; See this updated 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 );

New Window( "Combo box test", 
	&amp;lt;&amp;lt; Modal,
	Panel Box( "Select a Date Range",
		Lineup Box( N Col( 1 ), 
			Text Box( "DCOP ID" ), 
			dc_cb = Combo Box(
				{"CED15_10", "CDM45.10", "CRL02.05", "CEM11.05", "CEM09.18", "CBI07.01"},
				dc_cb &amp;lt;&amp;lt; GetSelected(),
				&amp;lt;&amp;lt; Set Width( 20 )
			)
		), 
		H List Box(
			Button Box( "OK",
				&amp;lt;&amp;lt;Set Function(
					Function( {self}, 

						//Updated this to Get Text
						dcop_id = dc_cb &amp;lt;&amp;lt; Get Text;
					)
				)
			),
			Button Box( "Cancel" )
		), 
	),
);

Write( "\\S:data\ENG_" || dcop_id || ".CSV" );&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Check out the scripting index to see more detail on those messages.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ih_0-1613759943323.png" style="width: 798px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/30465i7C943BC05631DF2D/image-dimensions/798x405?v=v2" width="798" height="405" role="button" title="ih_0-1613759943323.png" alt="ih_0-1613759943323.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 19 Feb 2021 18:39:26 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-use-variable-selected-in-combo-box-into-data-extraction/m-p/360884#M61044</guid>
      <dc:creator>ih</dc:creator>
      <dc:date>2021-02-19T18:39:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to use variable selected in combo box into data extraction path</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-use-variable-selected-in-combo-box-into-data-extraction/m-p/362144#M61183</link>
      <description>&lt;P&gt;Sweet, works nice.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any chance I could use combo box and get&amp;nbsp; outcome as a number&lt;SPAN style="font-family: inherit;"&gt;?&lt;/SPAN&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );

New Window( "Combo box test", 
	&amp;lt;&amp;lt; Modal,
	Panel Box( "Select a Date Range",
		Lineup Box( N Col( 1 ), 
			Text Box( "DCOP ID" ), 
			dc_cb = Combo Box(
				{"10", "20", "30"},
				dc_cb &amp;lt;&amp;lt; GetSelected(),
				&amp;lt;&amp;lt; Set Width( 20 )
			)
		), 
		H List Box(
			Button Box( "OK",
				&amp;lt;&amp;lt;Set Function(
					Function( {self}, 

						//Insted "10" as text will need 10 as number???
						dcop_id = dc_cb &amp;lt;&amp;lt; Get ;
					)
				)
			),
			Button Box( "Cancel" )
		), 
	),
);
//dcop_id is an number
Write( "\\S:data\ENG_" || dcop_id || ".CSV" );&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 24 Feb 2021 12:04:58 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-use-variable-selected-in-combo-box-into-data-extraction/m-p/362144#M61183</guid>
      <dc:creator>swiergi11</dc:creator>
      <dc:date>2021-02-24T12:04:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to use variable selected in combo box into data extraction path</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-use-variable-selected-in-combo-box-into-data-extraction/m-p/362157#M61184</link>
      <description>&lt;P&gt;All you need to do is to use the Num() function to convert the character string to numeric.&amp;nbsp; Also, you need to use the Get Selected message, not the Get message.&amp;nbsp; Get Selected returns the value, while Get returns the index number.&lt;/P&gt;
&lt;P&gt;See the Scripting Index for definition of the messages available to the Combo Box().&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dcop_id = Num( dc_cb &amp;lt;&amp;lt; Get Selected ) ;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I strongly suggest that you take the time to read the Scripting Guide found in the JMP Documentation Library, under the Help Menu.&amp;nbsp; It will really provide you with the background that will make your venture into JSL a far easier task.&lt;/P&gt;</description>
      <pubDate>Wed, 24 Feb 2021 12:23:20 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-use-variable-selected-in-combo-box-into-data-extraction/m-p/362157#M61184</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2021-02-24T12:23:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to use variable selected in combo box into data extraction path</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-use-variable-selected-in-combo-box-into-data-extraction/m-p/362176#M61189</link>
      <description>Thanks a lot, that works perfectly, will do.&lt;BR /&gt;&lt;BR /&gt;Thanks again</description>
      <pubDate>Wed, 24 Feb 2021 13:43:08 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-use-variable-selected-in-combo-box-into-data-extraction/m-p/362176#M61189</guid>
      <dc:creator>swiergi11</dc:creator>
      <dc:date>2021-02-24T13:43:08Z</dc:date>
    </item>
  </channel>
</rss>

