- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Naming subsets in JSL
Hi!
I have a large dt, and want do make subsets from a column. I've managed to do it, but the subsets have all the columns locked. How I can unlock them in the code?
Also, how can I specify it's names, so I can work with those later?
dt2 << (Subset(
By( :Filial ),
Selected Rows( 0 ),
columns( :Cod. Cliente DPK,
:Desc. Município Cadastro,
:Desc. Cliente,
:Desc. Tipo Cliente N1,
:Desc. Tipo Cliente N2,
:Name( "Sum(Vlr. Venda Comercial)" ),
:Name( "Sum(Vlr. Lucro Bruto)" ),
:Mg Bruta
)));
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Naming subsets in JSL
Depending on what you want to happen next, there may be a better way to do what you have in mind (maybe using a data filter instance). But, if you want or need to use 'subset', try something like:
Names Default To Here( 1 );
dt = Open("$SAMPLE_DATA/Big Class.jmp");
dts = dt << subset(By(:sex), Columns(:name, :age)); // Using 'By' makes a subset table for each level in the hspecified column. 'dts' is a list of associated table references
// Change the names of the subset tables
dts[1] << setName("Females");
dts[2] << setName("Males");
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Naming subsets in JSL
Depending on what you want to happen next, there may be a better way to do what you have in mind (maybe using a data filter instance). But, if you want or need to use 'subset', try something like:
Names Default To Here( 1 );
dt = Open("$SAMPLE_DATA/Big Class.jmp");
dts = dt << subset(By(:sex), Columns(:name, :age)); // Using 'By' makes a subset table for each level in the hspecified column. 'dts' is a list of associated table references
// Change the names of the subset tables
dts[1] << setName("Females");
dts[2] << setName("Males");
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Naming subsets in JSL
Ooh, that's great!
I just want to break the original dt in others, and work with each in different ways... That's the best way of doing the separation?
Another question: when working with each of the subsetted tables, how i specify them? By dts1, dts2, etc.? Or I can also determine that?