Hello. I am a JSL rookie but have some scripting experience with VBA and Python.
I have a table that has two columns 'purification_run' and 'parent_purification_runs'. I want to delete each row that has a 'purification_run' field that is contained in any of the 'parent_purification_runs' fields. I wrote the following JSL script to accomplish this, and it runs, but does not perform the intended deletion. Can someone help put me on the right track? Thanks!
// Get handles to the columns
purificationRunCol = Column("purification_run");
parentPurificationRunsCol = Column("parent_purification_runs");
// Get the list of all unique parent_purification_runs values
allParentPurificationRuns = parentPurificationRunsCol << Get Values;
// Iterate through each row
For Each Row(
// Get the purification_run value for the current row
currentPurificationRun = purificationRunCol << Get As String;
// Check if the purification_run is present in the list of parent_purification_runs
If(Contains(allParentPurificationRuns, currentPurificationRun),
// Delete the row if the condition is true
Current Data Table() << Delete Rows;
);
);