Hello everyone,
I have a database with duplicate values for some columns. The objective is to remove values from a column by assigning the value “.when the previously mentioned columns have duplicate values.
Here is an overview of the database:

For example, on this extract: when there are duplicate cells (task column, batch and op) it would be necessary to be able to assign the value “.(this therefore amounts to deleting the values) in the % Prd, % Proc, % Prd (6months), % Proc (6months) columns.
To get this:

I started with the following script:
Names Default To Here( 1 );
dt = current data table();
// Sélectionner les lignes dupliquées
a = dt << Select Duplicate Rows( Match( :lot, :tache, :op ) );
Column(dt, 11)[a] =.;
Column(dt, 12)[a] =.;
Column(dt, 13)[a] =.;
Column(dt, 14)[a] =.;
Thanks for your help !
You can use Data table subscripting to replace the values in columns. First get a list of duplicated values (<< Select Duplicate Rows + << Get Selected Rows is one option)
Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Big Class.jmp");
columns_to_modify = {"height", "weight"};
dt << Clear Select;
dt << Select Duplicate Rows(Match(:age, :sex));
duplicate_rows = dt << Get Selected Rows;
dt << Clear Select;
wait(1);
dt[duplicate_rows, columns_to_modify] = .;
I ended up using both of these functions but without the proper JSL language construct so thank you for your reply!