Something like this should do it:
Get Latest Row = Function({dt,ID},{Default Local},
// this can be much simpler if we assume datetime order!
//get only those rows matching the specified laser ID
lstRows = dt << Get Rows Where(:Laser ID == ID);
//get the corresponding times as a list
lstTimes = Column(dt,"Time")[lstRows];
// locate the maximum time
loc = Loc Max(lstTimes);
// return the row containing the maximum time
lstRows[loc]
);
//source data table
dt = Data Table("Initial");
// get list of unique values for Laser ID
Summarize(lstIDs = By(:Laser ID));
// create empty final table
newDt = dt << Subset(Copy Formulas(0));
newDt << Select All Rows;
newDt << Delete Rows;
newDt << Set Name("Final");
// create a row for each result
Column(newDt,"Laser ID") << Set Values(lstIDs);
//iterate through each ID to find the row with the latest date
For (i=1,i<=NItems(lstIDs),i++,
currentID = lstIDs[i];
r = Get Latest Row(dt,currentID);
show(r);
//place values from r'th row into new data table
For (c=1,c<=NCols(dt),c++,
Column(newDt,c)[i] = Column(dt,c)[r]
)
);
-Dave