Comment puis-je supprimer des lignes étant donné une condition dans JSLBonjour. Je suis un débutant en JSL mais j'ai une certaine expérience en matière de script avec VBA et Python.
J'ai un tableau qui comporte deux colonnes « purification_run » et « parent_purification_runs ». Je souhaite supprimer chaque ligne contenant un champ « purification_run » contenu dans l'un des champs « parent_purification_runs ». J'ai écrit le script JSL suivant pour accomplir cela, et il s'exécute, mais n'effectue pas la suppression prévue. Quelqu'un peut-il m'aider à me mettre sur la bonne voie ? Merci!
// 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;
);
);Automatisation et scriptsmacOSRe : Comment puis-je supprimer des lignes étant donné une condition dans JSLC'est une façon de résoudre le problème
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 );