JSL で条件を指定して行を削除するにはどうすればよいですかこんにちは。私は JSL の初心者ですが、VBA と Python のスクリプト作成の経験はあります。
「purification_run」と「parent_purification_runs」の 2 つの列を持つテーブルがあります。 「parent_purification_runs」フィールドのいずれかに含まれる「purification_run」フィールドを持つ各行を削除したいと考えています。これを実現するために次の JSL スクリプトを作成しました。実行されますが、意図した削除は実行されません。誰かが私を正しい軌道に乗せるのを手伝ってくれませんか?ありがとう!
// 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;
);
);自動化とスクリプト作成マックOSRe: JSL で条件を指定して行を削除するにはどうすればよいですかこれは問題を処理する 1 つの方法です
Names Default To Here( 1 );
dt = Current Data Table();
// Get the list of all parent_purification_runs values
allParentPurificationRuns = :parent_purification_runs << get values;
For Each Row(
If( Contains( allParentPurificationRuns, :purification_run ),
dt << Select Rows( Row() )
)
);
Try( dt << delete rows );