Hi @EstherV,
Without having more of the code to try out I have to make a guess or two:
I think you are getting that error message because summary tables in JMP are linked to the original table by default, which means that row selections are linked. This also means that the columns in your summary table will be locked so that the correspondence between the source data and summary data remains constant. You can adjust this behavior by disabling the linking when you make the summary table in line 34.
dt2 = dt1 << Summary(
Group( :VID, :DEVICE_NUMBER ),
Link to original data table( 0 )
);
Alternatively, it might be that in line 50 you are not explicitly stating that you wish to replace the value in dt1 with a value in dt2, and the current data table from JMP's perspective may still be the summary table. That line might need to be adjusted to read dt1:VID[i] = dt2:VID[i]
I hope this helps!
@julian