- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Flag rows in a dataset
Hi,
I want to figure out a way that JMP flags rows in a dataset or qunatify the number of values that are less than or equal to 40.
It will be very cool if it can be a JSL script that can be used for an add in.
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Flag rows in a dataset
Oops.....that's what I get for not actually running the code. The Select Rows Where() should have been
dt << get rows where( :Count <= 40 );
However, given that you also want the rows selected....I think the following script will work better
names default to here(1);
dt = Current Data Table();
dt << Select Rows Where( :Count <= 40 );
NumberOfRows = N Rows( dt << get selected rows );
New Window( "Message",
modal,
H List Box(
Spacer Box( size( 5, 0 ) ),
Text Box( Char( Length( NumberOfRows ) ) ),
Text Box( " Columns Were Deleted" )
)
);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Flag rows in a dataset
I don't know what the Variable of question is, however the simple script to do this is:
NumberOfRows = N Rows( Select Rows Where( :Your Target Row <= 40) );
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Flag rows in a dataset
Thank you for the response.
I have this response variable in my data set which I want to flag if it has a value 40 or less.
The command you shared with me does highlight the rows that have a value of 40 or less, however is there a way that I can add the number of rows highlighted and have some caption box pop up with the number of rows highlighted?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Flag rows in a dataset
Something like this:
NumberOfRows = N Rows( Select Rows Where( :Count <= 40) );
New Window( "Message", modal,
H List Box(
Spacer Box( size( 5, 0 ) ),
Text Box( Char( Length(NumberOfRows) ) ),
Text Box( " Columns Were Deleted" )
)
);
However, the pop up screen does not show
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Flag rows in a dataset
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Flag rows in a dataset
Oops.....that's what I get for not actually running the code. The Select Rows Where() should have been
dt << get rows where( :Count <= 40 );
However, given that you also want the rows selected....I think the following script will work better
names default to here(1);
dt = Current Data Table();
dt << Select Rows Where( :Count <= 40 );
NumberOfRows = N Rows( dt << get selected rows );
New Window( "Message",
modal,
H List Box(
Spacer Box( size( 5, 0 ) ),
Text Box( Char( Length( NumberOfRows ) ) ),
Text Box( " Columns Were Deleted" )
)
);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Flag rows in a dataset
But for some reason when I try to run your code I get this error:
argument should be character in access or evaluation of 'Length' , Bad Argument( 1 ), Length/*###*/(NumberOfRows)
In the following script, error marked by /*###*/
Names Default To Here( 1 );
dt = Current Data Table();
dt << Select Rows Where( :Count <= 40 );
NumberOfRows = N Rows( dt << get selected rows );
New Window( "Message",
modal,
H List Box(
Spacer Box( size( 5, 0 ) ),
Text Box( Char( Length/*###*/(NumberOfRows) ) ),
Text Box( " Columns Were Deleted" )
)
);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Flag rows in a dataset
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Flag rows in a dataset
got it. in the code remove Rows from the Select Rows Where