<?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: removing {} from &amp;lt;&amp;lt; get selected variable in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/removing-from-lt-lt-get-selected-variable/m-p/531079#M75425</link>
    <description>&lt;P&gt;Thank you for this solution. Works just fine.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Had one question, what if the column names have '/' in them and don't work directly without using ":name(column name)" ? Any way of using ":name(column name)" instead of just "column name" ?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in Advance.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 05 Aug 2022 21:50:43 GMT</pubDate>
    <dc:creator>ankitgssingh</dc:creator>
    <dc:date>2022-08-05T21:50:43Z</dc:date>
    <item>
      <title>removing {} from &lt;&lt; get selected variable</title>
      <link>https://community.jmp.com/t5/Discussions/removing-from-lt-lt-get-selected-variable/m-p/53496#M30262</link>
      <description>&lt;P&gt;the output below puts { } on the date_selection variable. How do I remove the brackets.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;output = {"date1"};

desired output = "date1";

date_list = Column( 2 ) &amp;lt;&amp;lt; get values;
Show( date_list );
run_select = New Window( "checkboxes",
	&amp;lt;&amp;lt;modal(),
	V List Box(
		cb_list = Check Box( date_list ),
		Button Box( "OK", date_selection = cb_list &amp;lt;&amp;lt; get selected )
	)
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 09 Jun 2023 23:24:46 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/removing-from-lt-lt-get-selected-variable/m-p/53496#M30262</guid>
      <dc:creator>HarryG</dc:creator>
      <dc:date>2023-06-09T23:24:46Z</dc:date>
    </item>
    <item>
      <title>Re: removing {} from &lt;&lt; get selected variable</title>
      <link>https://community.jmp.com/t5/Discussions/removing-from-lt-lt-get-selected-variable/m-p/53497#M30263</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/11388"&gt;@HarryG&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;When you send the message "&amp;lt;&amp;lt; get selected" to the checkbox&amp;nbsp;&lt;SPAN&gt;cb_list, JMP will return&amp;nbsp;a list of all the selected elements, which as you noticed is not equivalent&amp;nbsp;to a simple text string (which is what the { } indicate). If you wish to access the just the text "date1," and that's the first element in the list&amp;nbsp;date_selection, you can subscript the list either with brackets or the subscript function:&amp;nbsp; date_selection[1]&amp;nbsp; &amp;nbsp;or&amp;nbsp; &amp;nbsp;subscript(date_selection,1).&amp;nbsp; Both of these operations will return&amp;nbsp;"date1" if that's the first element in your list.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;I hope this helps!&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/2026"&gt;@jules&lt;/a&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Mar 2018 01:20:19 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/removing-from-lt-lt-get-selected-variable/m-p/53497#M30263</guid>
      <dc:creator>jules</dc:creator>
      <dc:date>2018-03-21T01:20:19Z</dc:date>
    </item>
    <item>
      <title>Re: removing {} from &lt;&lt; get selected variable</title>
      <link>https://community.jmp.com/t5/Discussions/removing-from-lt-lt-get-selected-variable/m-p/53498#M30264</link>
      <description>&lt;P&gt;Thanks &lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/2026"&gt;@jules&lt;/a&gt;&amp;nbsp;for the quick response! also thanks for letting me know my output is a List and not a simple string.&amp;nbsp;&amp;nbsp;this case the output selection will always be only 1, so a list is not needed.&lt;/P&gt;&lt;P&gt;when I use either&amp;nbsp;&lt;SPAN&gt;&amp;nbsp;date_selection[1]&amp;nbsp; &amp;nbsp;or&amp;nbsp; &amp;nbsp;subscript(date_selection,1) my output now looks like {{"date1"}}. Another set of brackets is added. I wanted to reduce the number of brackets, not add them. LOL! :)&lt;/img&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Mar 2018 01:42:41 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/removing-from-lt-lt-get-selected-variable/m-p/53498#M30264</guid>
      <dc:creator>HarryG</dc:creator>
      <dc:date>2018-03-21T01:42:41Z</dc:date>
    </item>
    <item>
      <title>Re: removing {} from &lt;&lt; get selected variable</title>
      <link>https://community.jmp.com/t5/Discussions/removing-from-lt-lt-get-selected-variable/m-p/53499#M30265</link>
      <description>&lt;P&gt;All you need to do, is to set the value of the returned variable to being the subscript as you generate the variable.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;button box("OK",date_selection=(cb_list&amp;lt;&amp;lt;get selected)[1])&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;by specifying the date_selection this way, date_selection will be a just a plain numeric variable.&lt;/P&gt;</description>
      <pubDate>Wed, 21 Mar 2018 01:50:16 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/removing-from-lt-lt-get-selected-variable/m-p/53499#M30265</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2018-03-21T01:50:16Z</dc:date>
    </item>
    <item>
      <title>Re: removing {} from &lt;&lt; get selected variable</title>
      <link>https://community.jmp.com/t5/Discussions/removing-from-lt-lt-get-selected-variable/m-p/53501#M30266</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/2687"&gt;@txnelson&lt;/a&gt;!!&lt;/P&gt;&lt;P&gt;that did the trick! the output is now a simple string as desired.&lt;/P&gt;</description>
      <pubDate>Wed, 21 Mar 2018 02:00:34 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/removing-from-lt-lt-get-selected-variable/m-p/53501#M30266</guid>
      <dc:creator>HarryG</dc:creator>
      <dc:date>2018-03-21T02:00:34Z</dc:date>
    </item>
    <item>
      <title>Re: removing {} from &lt;&lt; get selected variable</title>
      <link>https://community.jmp.com/t5/Discussions/removing-from-lt-lt-get-selected-variable/m-p/530565#M75375</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a follow up question on this. If I want all the items in the list instead of a single one and I dont want them in brackets similar to the above question. What can I do to get that?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I try this, I get the first item only without brackets.&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="jsl"&gt;button box("OK",date_selection=(cb_list&amp;lt;&amp;lt;get selected)[1])&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I try this, I get all the items but with brackets. I want all the items in cb_list but without the brackets.&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;button box("OK",date_selection=(cb_list&amp;lt;&amp;lt;get selected))&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 04 Aug 2022 18:40:08 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/removing-from-lt-lt-get-selected-variable/m-p/530565#M75375</guid>
      <dc:creator>ankitgssingh</dc:creator>
      <dc:date>2022-08-04T18:40:08Z</dc:date>
    </item>
    <item>
      <title>Re: removing {} from &lt;&lt; get selected variable</title>
      <link>https://community.jmp.com/t5/Discussions/removing-from-lt-lt-get-selected-variable/m-p/530566#M75376</link>
      <description>&lt;P&gt;What if I want all the items in the list but without brackets. So something like this "Cats", "Dogs" instead of {"Cats", "Dogs"} ?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As in my case the list if the list of columns selected in a data filter. I want to use that list of columns in a formula column to concat the values in those list of columns.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt = Open( "$SAMPLE_DATA/Big Class.jmp" );

myPlatform = New Window( "Filter Col Selector Example",
fontobj = lb = Filter Col Selector( width( 250 ) ),
button box("OK", date_selection=(lb&amp;lt;&amp;lt;get selected); myPlatform &amp;lt;&amp;lt; close window;)
);



//creating the formulacol

dt &amp;lt;&amp;lt; new column("FINALNEW", Formula(Concat( date_selection ) ) );&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 04 Aug 2022 18:46:59 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/removing-from-lt-lt-get-selected-variable/m-p/530566#M75376</guid>
      <dc:creator>ankitgssingh</dc:creator>
      <dc:date>2022-08-04T18:46:59Z</dc:date>
    </item>
    <item>
      <title>Re: removing {} from &lt;&lt; get selected variable</title>
      <link>https://community.jmp.com/t5/Discussions/removing-from-lt-lt-get-selected-variable/m-p/530571#M75377</link>
      <description>&lt;P&gt;The&amp;nbsp; &amp;lt;&amp;lt; get selected message returns a JMP list.&amp;nbsp; JMP Lists are noted by the curly brackets { "A", "B", "C" }.&amp;nbsp; Just like a JMP matrix is noted by square brackets&amp;nbsp; [ 4, 3, 5 ].&lt;/P&gt;
&lt;P&gt;Why do you want the curly brackets removed?&lt;/P&gt;</description>
      <pubDate>Thu, 04 Aug 2022 18:57:46 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/removing-from-lt-lt-get-selected-variable/m-p/530571#M75377</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2022-08-04T18:57:46Z</dc:date>
    </item>
    <item>
      <title>Re: removing {} from &lt;&lt; get selected variable</title>
      <link>https://community.jmp.com/t5/Discussions/removing-from-lt-lt-get-selected-variable/m-p/530574#M75379</link>
      <description>&lt;P&gt;I think this is the best way to handle the issue&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/big class.jmp" );

date_selection = {"name", "sex"};&lt;BR /&gt;
cString = concat items(date_selection, ",");
Eval( Parse( "dt &amp;lt;&amp;lt; new column(\!"FINALNEW\!", Formula(Concat(" || 
	cString || " ) ) );" ) );&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 04 Aug 2022 19:21:55 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/removing-from-lt-lt-get-selected-variable/m-p/530574#M75379</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2022-08-04T19:21:55Z</dc:date>
    </item>
    <item>
      <title>Re: removing {} from &lt;&lt; get selected variable</title>
      <link>https://community.jmp.com/t5/Discussions/removing-from-lt-lt-get-selected-variable/m-p/530643#M75386</link>
      <description>&lt;P&gt;I'll always argue against Eval(Parse()) :p&lt;/img&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can just do the concat items directly with &amp;lt;&amp;lt; Set Each Value (so you don't need to have the variable set)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&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" );

myPlatform = New Window( "Filter Col Selector Example", &amp;lt;&amp;lt; modal, 
	fontobj = lb = Filter Col Selector( width( 250 ) ),
	button box("OK", date_selection=(lb&amp;lt;&amp;lt;get selected))
);



//creating the formulacol

dt &amp;lt;&amp;lt; new column("FINALNEW", character, &amp;lt;&amp;lt;SetEachValue(Concatitems( date_selection, "," ) ) );&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I wonder what you're actually doing with that column if it's really a list of dates, it might be worth just putting the list into a column as an expression column type.&amp;nbsp; Depending on how you're using this column.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;// using an expression column
dt &amp;lt;&amp;lt; new column("FINALNEW_expression", expression, &amp;lt;&amp;lt;SetEachValue(date_selection ) );
&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, 04 Aug 2022 20:49:09 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/removing-from-lt-lt-get-selected-variable/m-p/530643#M75386</guid>
      <dc:creator>vince_faller</dc:creator>
      <dc:date>2022-08-04T20:49:09Z</dc:date>
    </item>
    <item>
      <title>Re: removing {} from &lt;&lt; get selected variable</title>
      <link>https://community.jmp.com/t5/Discussions/removing-from-lt-lt-get-selected-variable/m-p/531069#M75423</link>
      <description>&lt;P&gt;Thank you. This solved my query.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 05 Aug 2022 21:04:54 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/removing-from-lt-lt-get-selected-variable/m-p/531069#M75423</guid>
      <dc:creator>ankitgssingh</dc:creator>
      <dc:date>2022-08-05T21:04:54Z</dc:date>
    </item>
    <item>
      <title>Re: removing {} from &lt;&lt; get selected variable</title>
      <link>https://community.jmp.com/t5/Discussions/removing-from-lt-lt-get-selected-variable/m-p/531070#M75424</link>
      <description>&lt;P&gt;It is not actually a date column. It is a list of column names which are all categorical. So when I say contact, I dont want to concat the column names. I want to contact the data in those columns together and make a new column out of it. So cannot use "concat Items" as I think it would concat the column names not their values.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 05 Aug 2022 21:06:37 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/removing-from-lt-lt-get-selected-variable/m-p/531070#M75424</guid>
      <dc:creator>ankitgssingh</dc:creator>
      <dc:date>2022-08-05T21:06:37Z</dc:date>
    </item>
    <item>
      <title>Re: removing {} from &lt;&lt; get selected variable</title>
      <link>https://community.jmp.com/t5/Discussions/removing-from-lt-lt-get-selected-variable/m-p/531079#M75425</link>
      <description>&lt;P&gt;Thank you for this solution. Works just fine.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Had one question, what if the column names have '/' in them and don't work directly without using ":name(column name)" ? Any way of using ":name(column name)" instead of just "column name" ?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in Advance.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 05 Aug 2022 21:50:43 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/removing-from-lt-lt-get-selected-variable/m-p/531079#M75425</guid>
      <dc:creator>ankitgssingh</dc:creator>
      <dc:date>2022-08-05T21:50:43Z</dc:date>
    </item>
  </channel>
</rss>

