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.
<JSL>
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 <= l, length += ls,
For(width = ws / 2, width <= w, width += ws,
height = Round(hs * layer, 1);
num = N Rows(dt);
num++;
dt << 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);