<?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 put a list into a table cell under a column in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/how-to-put-a-list-into-a-table-cell-under-a-column/m-p/605000#M80752</link>
    <description>&lt;P&gt;Your code works fine for me&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="txnelson_0-1677214021020.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/50419i654C96010F0EBB38/image-size/medium?v=v2&amp;amp;px=400" role="button" title="txnelson_0-1677214021020.png" alt="txnelson_0-1677214021020.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dt = Current Data Table();

A = {"96", "104", "112", "120"};
B = {"1", "100", "111", "121"};
C = {"6", "14", "112", "129"};
D = {"9", "124", "132", "160"};

dt &amp;lt;&amp;lt; New Column( "Value",
	Expression,
	formula(
	
		If(
			:Mode == "A", A,
			:Mode == "B", B,
			:Mode == "C", C,
			:Mode == "D", D
		)
	)
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Fri, 24 Feb 2023 04:47:34 GMT</pubDate>
    <dc:creator>txnelson</dc:creator>
    <dc:date>2023-02-24T04:47:34Z</dc:date>
    <item>
      <title>how to put a list into a table cell under a column</title>
      <link>https://community.jmp.com/t5/Discussions/how-to-put-a-list-into-a-table-cell-under-a-column/m-p/604744#M80749</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I created variables that are list. I want to create new column that under if statement will fill up the cell with those variables. So I can get table as below. How can I add list into a cell?&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="dadawasozo_0-1677200258932.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/50415i92A53E33454FB63F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="dadawasozo_0-1677200258932.png" alt="dadawasozo_0-1677200258932.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;A={"96", "104", "112", "120"};
B={"1", "100", "111", "121"};
C={"6", "14", "112", "129"};
D={"9", "124", "132", "160"};

dt &amp;lt;&amp;lt; New column("Value", Expression, formula(
	
	if (
		:Mode=="A" , A,
		:Mode=="B" , B,
		:Mode=="C" , C,
		:Mode=="D" , D,
		
		
	)&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 08 Jun 2023 16:33:34 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/how-to-put-a-list-into-a-table-cell-under-a-column/m-p/604744#M80749</guid>
      <dc:creator>dadawasozo</dc:creator>
      <dc:date>2023-06-08T16:33:34Z</dc:date>
    </item>
    <item>
      <title>Re: how to put a list into a table cell under a column</title>
      <link>https://community.jmp.com/t5/Discussions/how-to-put-a-list-into-a-table-cell-under-a-column/m-p/605000#M80752</link>
      <description>&lt;P&gt;Your code works fine for me&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="txnelson_0-1677214021020.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/50419i654C96010F0EBB38/image-size/medium?v=v2&amp;amp;px=400" role="button" title="txnelson_0-1677214021020.png" alt="txnelson_0-1677214021020.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dt = Current Data Table();

A = {"96", "104", "112", "120"};
B = {"1", "100", "111", "121"};
C = {"6", "14", "112", "129"};
D = {"9", "124", "132", "160"};

dt &amp;lt;&amp;lt; New Column( "Value",
	Expression,
	formula(
	
		If(
			:Mode == "A", A,
			:Mode == "B", B,
			:Mode == "C", C,
			:Mode == "D", D
		)
	)
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 24 Feb 2023 04:47:34 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/how-to-put-a-list-into-a-table-cell-under-a-column/m-p/605000#M80752</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2023-02-24T04:47:34Z</dc:date>
    </item>
    <item>
      <title>Re: how to put a list into a table cell under a column</title>
      <link>https://community.jmp.com/t5/Discussions/how-to-put-a-list-into-a-table-cell-under-a-column/m-p/605046#M80755</link>
      <description>&lt;P&gt;Besides missing few closing brackets and having extra , I don't see issues with the script as&amp;nbsp;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/2687"&gt;@txnelson&lt;/a&gt;&amp;nbsp;also said&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);

dt = New Table("Untitled",
	Add Rows(5),
	Compress File When Saved(1),
	Set Header Height(46),
	New Column("Mode", Character, "Nominal", Set Values({"A", "C", "A", "A", "D"}))
);

A = {"96", "104", "112", "120"};
B = {"1", "100", "111", "121"};
C = {"6", "14", "112", "129"};
D = {"9", "124", "132", "160"};

dt &amp;lt;&amp;lt; New Column("Value",
	Expression,
	formula(
	
		If(
			:Mode == "A", A,
			:Mode == "B", B,
			:Mode == "C", C,
			:Mode == "D", D
		)
	)
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;If you need to have a formula and not values in those cells, I would suggest checking out&amp;nbsp;&lt;LI-MESSAGE title="Insert one expression into another using Eval Insert, Eval Expr, Parse, and Substitute" uid="48998" url="https://community.jmp.com/t5/JSL-Cookbook-Archived/Insert-one-expression-into-another-using-Eval-Insert-Eval-Expr/m-p/48998#U48998" discussion_style_icon_css="lia-mention-container-editor-message lia-img-icon-tkb-thread lia-fa-icon lia-fa-tkb lia-fa-thread lia-fa"&gt;&lt;/LI-MESSAGE&gt;&amp;nbsp; as it will most likely prevent some issues which might occur.&lt;/P&gt;</description>
      <pubDate>Fri, 24 Feb 2023 05:58:31 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/how-to-put-a-list-into-a-table-cell-under-a-column/m-p/605046#M80755</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2023-02-24T05:58:31Z</dc:date>
    </item>
    <item>
      <title>Re: how to put a list into a table cell under a column</title>
      <link>https://community.jmp.com/t5/Discussions/how-to-put-a-list-into-a-table-cell-under-a-column/m-p/605120#M80766</link>
      <description>&lt;P&gt;Hi Jim,&lt;/P&gt;&lt;P&gt;Your are right. I 'm not sure what was the problem that it wasn't working previously. It works after I close JMP and reopen it.&lt;/P&gt;</description>
      <pubDate>Fri, 24 Feb 2023 13:20:56 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/how-to-put-a-list-into-a-table-cell-under-a-column/m-p/605120#M80766</guid>
      <dc:creator>dadawasozo</dc:creator>
      <dc:date>2023-02-24T13:20:56Z</dc:date>
    </item>
  </channel>
</rss>

