Subscribe Bookmark RSS Feed

JSL - Problem with Concatenate and New Data View

drblove

Community Trekker

Joined:

Nov 2, 2016

Hi,

 

I'm having a weird issue where when I load two excel files then concatenate them and view them.  I am doing this two ways one where file 1 with file 2 added to the bottom and view it.  Then I did file 2 with file 1 added to the bottom and view it.  The results should be same number of rows, but I am getting one output with extra rows, and I don't understand what is happening.  Does anyone understand what is happening and how to fix it, i.e. only the correct resulting tables work.  Thank you in advance!

 

Brad

1 REPLY
ian_jmp

Staff

Joined:

Jun 23, 2011

Both tables initially have 7 rows. Line 92 means that you have two table references pointing to the same table, so after line 93, 'input_data1' has 14 rows. Line 98 then means that the result has 7+14 = 21 rows. In short, line 92 (and 97) don't make a new instance of a table, but rather just a pointer to it.

 

If 'dt1' is a table reference, to make a copy of the table you could do, for instance, 'dt2 = eval(dt1 << getScript)'.