Comment changer la valeur de colonne dans la ligne sélectionnée?Salut à tous.
Je souhaite modifier la valeur Col dans uniquement la ligne sélectionnée à l'aide de JSL.
(ex, deuxième valeur Col: 14 -> 9999)
Puis-je avoir des conseils?
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
Current Data Table() << Sort( replace table, Column( address, 2 ), Order( Ascending ) );
Current Data Table() << Sort( replace table, Column( address, 4 ), Order( Ascending ) );
//wait(1);
dt << Select duplicate rows( Match( Column(dt, 2), Column(dt, 3 ), Column(dt, 4 ) ) );
Je ne peux pas le terminer ...
Aidez-moi, s'il vous plaît.
ScriptingRe: Comment changer la valeur de colonne dans la ligne sélectionnée?dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
Current Data Table() << Sort( replace table, Column( address, 2 ), Order( Ascending ) );
Current Data Table() << Sort( replace table, Column( address, 4 ), Order( Ascending ) );
//wait(1);
dt << Select duplicate rows( Match( Column( dt, 2 ), Column( dt, 3 ), Column( dt, 4 ) ) );
aa = dt <<GET selected="" rows=""> 0,
Column(dt,2) << Set Values("9999");
);
</GET>Je ne sais pas pourquoi ça ne marche pas.
Re: Comment changer la valeur de colonne dans la ligne sélectionnée?J'ai annoté mon JSL pour savoir quel est le bon JSL pour faire ce que vous cherchez à faire
names default to here(1);
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
// The sort is not required for the Select duplicate rows to work
// The 2 sorts you specified, first sorted all of the rows by age and
// then sorted all of the rows by height. I think what you were looking
// to do, was to sort all of the heights within each age group. That
// would be accomplished with the line of code below
dt << Sort( replace table, by( Column( 2 ),Column( 4 ) ), Order( Ascending, Ascending ) );
dt << Select duplicate rows( Match( Column( dt, 2 ), Column( dt, 3 ), Column( dt, 4 ) ) );
aa = dt <<GET selected="" rows=""> 0,
// All you need is a simple assignment statement setting all of the rows found for the column
// age equal to 9999
(Column(dt,2)[aa]) = 9999;
);</GET>
Re : Comment changer la valeur Col dans la ligne sélectionnée ?Merci beaucoup!!!