<?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 How do i Stack newly created column without specified naming in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/How-do-i-Stack-newly-created-column-without-specified-naming/m-p/673158#M86078</link>
    <description>&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;num_columns = 3;
col_names = Associative Array();
For(i = 1, i &amp;lt;= num_columns, i++,col_name = Char(400 + (i - 1) * 100);ATOM0TABLE &amp;lt;&amp;lt; New Column(col_name, Character, Nominal, formula(Word(i, :FINAL_RESULT, "_"), ""));
col_names[i] = col_name);
stacktable = ATOM0TABLE &amp;lt;&amp;lt; Stack(
   Columns ( col_names),  // List of columns to stack
   Source Label Column("Label"), Stacked Data Column("Data"),
   Output Table("stacktable"));&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Was trying to create 3 columns with column name 400 and continuously till 600 and gonna stack those newly column. It works fine till creating the column but not able to stack the column as is showing &lt;STRONG&gt;"Column not found in access or evaluation of 'Bad Argument'&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Empty()"&lt;/STRONG&gt;&lt;/P&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>Fri, 01 Sep 2023 03:37:53 GMT</pubDate>
    <dc:creator>weilyne</dc:creator>
    <dc:date>2023-09-01T03:37:53Z</dc:date>
    <item>
      <title>How do i Stack newly created column without specified naming</title>
      <link>https://community.jmp.com/t5/Discussions/How-do-i-Stack-newly-created-column-without-specified-naming/m-p/673158#M86078</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;num_columns = 3;
col_names = Associative Array();
For(i = 1, i &amp;lt;= num_columns, i++,col_name = Char(400 + (i - 1) * 100);ATOM0TABLE &amp;lt;&amp;lt; New Column(col_name, Character, Nominal, formula(Word(i, :FINAL_RESULT, "_"), ""));
col_names[i] = col_name);
stacktable = ATOM0TABLE &amp;lt;&amp;lt; Stack(
   Columns ( col_names),  // List of columns to stack
   Source Label Column("Label"), Stacked Data Column("Data"),
   Output Table("stacktable"));&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Was trying to create 3 columns with column name 400 and continuously till 600 and gonna stack those newly column. It works fine till creating the column but not able to stack the column as is showing &lt;STRONG&gt;"Column not found in access or evaluation of 'Bad Argument'&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Empty()"&lt;/STRONG&gt;&lt;/P&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>Fri, 01 Sep 2023 03:37:53 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-do-i-Stack-newly-created-column-without-specified-naming/m-p/673158#M86078</guid>
      <dc:creator>weilyne</dc:creator>
      <dc:date>2023-09-01T03:37:53Z</dc:date>
    </item>
    <item>
      <title>Re: How do i Stack newly created column without specified naming</title>
      <link>https://community.jmp.com/t5/Discussions/How-do-i-Stack-newly-created-column-without-specified-naming/m-p/673168#M86079</link>
      <description>&lt;P&gt;You are trying to use Associative Array as input for &amp;lt;&amp;lt; Stack. You can get the values from associative array by using &amp;lt;&amp;lt; Get Values. (thought un this case it might be better to use list).&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);

dt = New Table("",
	Add Rows(1),
	New Column("FINAL_RESULT", Character, Nominal, Values({"TEST1_TEST2_TEST3"}))
);

num_columns = 3;
col_names = {};

For(i = 1, i &amp;lt;= num_columns, i++,
	col_name = Char(400 + (i - 1) * 100);
	new_col = dt &amp;lt;&amp;lt; New Column(col_name, Character, Nominal, formula(Word(i, :FINAL_RESULT, "_"), ""));
	Insert Into(col_names, new_col &amp;lt;&amp;lt; get name);
);

stacktable = dt &amp;lt;&amp;lt; Stack(
	// Columns(col_names &amp;lt;&amp;lt; get values),  // if using associative array
	Columns(col_names),
	Source Label Column("Label"),
	Stacked Data Column("Data"),
	Output Table("stacktable")
);
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 01 Sep 2023 04:43:13 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-do-i-Stack-newly-created-column-without-specified-naming/m-p/673168#M86079</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2023-09-01T04:43:13Z</dc:date>
    </item>
    <item>
      <title>Re: How do i Stack newly created column without specified naming</title>
      <link>https://community.jmp.com/t5/Discussions/How-do-i-Stack-newly-created-column-without-specified-naming/m-p/673222#M86083</link>
      <description>&lt;P&gt;Thanks you and I am able to stack those column now.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 01 Sep 2023 08:48:15 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-do-i-Stack-newly-created-column-without-specified-naming/m-p/673222#M86083</guid>
      <dc:creator>weilyne</dc:creator>
      <dc:date>2023-09-01T08:48:15Z</dc:date>
    </item>
  </channel>
</rss>

