<?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 Add additional values to list using col list box in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Add-additional-values-to-list-using-col-list-box/m-p/471544#M71606</link>
    <description>&lt;P&gt;Is it possible that an existing list would have an additional data from col list box?&lt;/P&gt;&lt;P&gt;For example: Fruits = {"apple", "mango", "strawberry"}&lt;/P&gt;&lt;P&gt;Then, when user picked banana, orange from the col list box, it will be added to the fruits list.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried using Fruits = get items but only the initial list values are initialized. Pls help&lt;/P&gt;</description>
    <pubDate>Sat, 10 Jun 2023 20:49:51 GMT</pubDate>
    <dc:creator>UserID16644</dc:creator>
    <dc:date>2023-06-10T20:49:51Z</dc:date>
    <item>
      <title>Add additional values to list using col list box</title>
      <link>https://community.jmp.com/t5/Discussions/Add-additional-values-to-list-using-col-list-box/m-p/471544#M71606</link>
      <description>&lt;P&gt;Is it possible that an existing list would have an additional data from col list box?&lt;/P&gt;&lt;P&gt;For example: Fruits = {"apple", "mango", "strawberry"}&lt;/P&gt;&lt;P&gt;Then, when user picked banana, orange from the col list box, it will be added to the fruits list.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried using Fruits = get items but only the initial list values are initialized. Pls help&lt;/P&gt;</description>
      <pubDate>Sat, 10 Jun 2023 20:49:51 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Add-additional-values-to-list-using-col-list-box/m-p/471544#M71606</guid>
      <dc:creator>UserID16644</dc:creator>
      <dc:date>2023-06-10T20:49:51Z</dc:date>
    </item>
    <item>
      <title>Re: Add additional values to list using col list box</title>
      <link>https://community.jmp.com/t5/Discussions/Add-additional-values-to-list-using-col-list-box/m-p/471568#M71610</link>
      <description>&lt;P&gt;Here are 2 examples.&amp;nbsp; The first one is using a Col List Box.&amp;nbsp; It requires the additional fruit choices to be column names, so that they will show up in the Col List Box as choices to be added to the Fruits list.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dt=new table("New Fruits",
	new column("Bananas"),
	new column("Oranges")
);
Fruits = {"apple", "mango", "strawberry"};
New Window( "Example",
	lb = col List Box(dt,all,
		width( 200 ),
		max selected( 1 ),
		nlines( 6 ),
		selList = lb &amp;lt;&amp;lt; get selected;
		locList = lb &amp;lt;&amp;lt; get selected indices;
		If( Contains( Fruits, selList[1] ) == 0,
			Insert Into( Fruits, selList[1] )
		);
		lb &amp;lt;&amp;lt; set selected(locList[1],0);
		show(Fruits);
	)
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;This seems to be an inefficient way to code this, unless the choices you want to make are actually column names.&amp;nbsp; If they are not column names that need to be selected, then by using just a List Box() will work just fine&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
Fruits = {"apple", "mango", "strawberry"};
New Window( "Example",
	lb = List Box(
		{"Banana", "Orange"},
		width( 200 ),
		max selected( 1 ),
		nlines( 6 ),
		selList = lb &amp;lt;&amp;lt; get selected;
		locList = lb &amp;lt;&amp;lt; get selected indices;
		If( Contains( Fruits, selList[1] ) == 0,
			Insert Into( Fruits, selList[1] )
		);
		lb &amp;lt;&amp;lt; set selected(locList[1],0);
		show(Fruits);
	)
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 21 Mar 2022 07:32:02 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Add-additional-values-to-list-using-col-list-box/m-p/471568#M71610</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2022-03-21T07:32:02Z</dc:date>
    </item>
  </channel>
</rss>

