<?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 Sequential numbering across different data tables in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Sequential-numbering-across-different-data-tables/m-p/809358#M98932</link>
    <description>&lt;P&gt;Hello all, I am pretty new to JSL, so I have this small doubt where I have 3 data tables, and each holds 12 rows. So, I want to add a line of code which gives me an output like for table1-the num col will be 1-12, for table2- the num col will be 13-24 and for table-3 the num col will be 25-36. Can you help me with this. Thank you in advance.&lt;/P&gt;
&lt;P&gt;&amp;lt;JSL&amp;gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;l = 117;

w = 32;

h = 43;

ls = 19.6;

ws = 16.4;

hs = 14.3;

numbers = Function({ls, ws, hs, l, w, layer},
	dt = New Table("data" || Char(layer),
		Add Rows(0),
		New Column("num", Numeric, continuous),
		New Column("length", Numeric),
		New Column("width", Numeric),
		New Column("height", Numeric),

	);
	For(length = ls / 2, length &amp;lt;= l, length += ls,
		For(width = ws / 2, width &amp;lt;= w, width += ws,
			height = Round(hs * layer, 1);

			num = N Rows(dt);
			num++;
			dt &amp;lt;&amp;lt; Add Rows(1);
			:num[N Rows(dt)] = num;
			:length[N Rows(dt)] = Round(length, 2);
			:width[N Rows(dt)] = Round(width, 2);
			:height[N Rows(dt)] = Round(height, 2);
		)
	);
	Return(dt);
);

table1 = numbers(ls, ws, hs, l, w, 1);
table2 = numbers(ls, ws, hs, l, w, 2);
table3 = numbers(ls, ws, hs, l, w, 3);&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 31 Oct 2024 15:18:27 GMT</pubDate>
    <dc:creator>MomentBeetle806</dc:creator>
    <dc:date>2024-10-31T15:18:27Z</dc:date>
    <item>
      <title>Sequential numbering across different data tables</title>
      <link>https://community.jmp.com/t5/Discussions/Sequential-numbering-across-different-data-tables/m-p/809358#M98932</link>
      <description>&lt;P&gt;Hello all, I am pretty new to JSL, so I have this small doubt where I have 3 data tables, and each holds 12 rows. So, I want to add a line of code which gives me an output like for table1-the num col will be 1-12, for table2- the num col will be 13-24 and for table-3 the num col will be 25-36. Can you help me with this. Thank you in advance.&lt;/P&gt;
&lt;P&gt;&amp;lt;JSL&amp;gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;l = 117;

w = 32;

h = 43;

ls = 19.6;

ws = 16.4;

hs = 14.3;

numbers = Function({ls, ws, hs, l, w, layer},
	dt = New Table("data" || Char(layer),
		Add Rows(0),
		New Column("num", Numeric, continuous),
		New Column("length", Numeric),
		New Column("width", Numeric),
		New Column("height", Numeric),

	);
	For(length = ls / 2, length &amp;lt;= l, length += ls,
		For(width = ws / 2, width &amp;lt;= w, width += ws,
			height = Round(hs * layer, 1);

			num = N Rows(dt);
			num++;
			dt &amp;lt;&amp;lt; Add Rows(1);
			:num[N Rows(dt)] = num;
			:length[N Rows(dt)] = Round(length, 2);
			:width[N Rows(dt)] = Round(width, 2);
			:height[N Rows(dt)] = Round(height, 2);
		)
	);
	Return(dt);
);

table1 = numbers(ls, ws, hs, l, w, 1);
table2 = numbers(ls, ws, hs, l, w, 2);
table3 = numbers(ls, ws, hs, l, w, 3);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 31 Oct 2024 15:18:27 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Sequential-numbering-across-different-data-tables/m-p/809358#M98932</guid>
      <dc:creator>MomentBeetle806</dc:creator>
      <dc:date>2024-10-31T15:18:27Z</dc:date>
    </item>
    <item>
      <title>Re: Sequential numbering across different data tables</title>
      <link>https://community.jmp.com/t5/Discussions/Sequential-numbering-across-different-data-tables/m-p/809361#M98934</link>
      <description>&lt;P&gt;take a look at the Sequence function.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Help&amp;gt;scripting index&amp;gt; search for sequence&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;...or, better:&lt;/P&gt;
&lt;P&gt;Start a new workflow, start the recorder&lt;/P&gt;
&lt;P&gt;In a data table, make a new column with a formula.&lt;/P&gt;
&lt;P&gt;in the formula editor type this - sequence()&lt;/P&gt;
&lt;P&gt;the functions arguments will appear, enter start as 1 and end as 12&lt;/P&gt;
&lt;P&gt;Apply the formula.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then turn off the workflow recorder, and viola you have a script for adding a column with a formula for a sequence of numbers.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 31 Oct 2024 15:14:16 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Sequential-numbering-across-different-data-tables/m-p/809361#M98934</guid>
      <dc:creator>Byron_JMP</dc:creator>
      <dc:date>2024-10-31T15:14:16Z</dc:date>
    </item>
  </channel>
</rss>

