cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • JMP 19 is here! See the new features at jmp.com/new.
  • Register to attend Discovery Summit 2025 Online: Early Users Edition, Sept. 24-25.
Choose Language Hide Translation Bar
mlo1
Level IV

Filling Comment into rows by selected row state from scatterplot

I like to avoid the way using the menu Rows -> Row Selection -> Name selection in column
I rather like  to put a comment into rows selected by mouse from a scatterplot via script.
The following does not write the text  to the column and does not give an error in the log.
How is the correct syntax? I am using JMP18

Names Default To Here( 1 );
dt = Current Data Table();


//Select data point in graph
// Use column Step do comment the Process steps

// Write the value into all selected rows
For Each Row(
    If( Row State() == 1,  // 1 = selected
        :Step = "Process1"
    )
);
1 ACCEPTED SOLUTION

Accepted Solutions

Re: Filling Comment into rows by selected row state from scatterplot

Hi @mlo1 ,

 

I opted to avoid looking for state and just grabbing the currently selected rows then using the positions to fill in the column.

 

dt=current data table();
selected=dt<<get selected rows; //grab the selected rows

column(dt,"Step")[selected]="Process 1";//replace the selected rows with "Process 1"

Thanks,

Ben

“All models are wrong, but some are useful”

View solution in original post

2 REPLIES 2

Re: Filling Comment into rows by selected row state from scatterplot

Hi @mlo1 ,

 

I opted to avoid looking for state and just grabbing the currently selected rows then using the positions to fill in the column.

 

dt=current data table();
selected=dt<<get selected rows; //grab the selected rows

column(dt,"Step")[selected]="Process 1";//replace the selected rows with "Process 1"

Thanks,

Ben

“All models are wrong, but some are useful”
mlo1
Level IV

Re: Filling Comment into rows by selected row state from scatterplot

Thank you very much.

Recommended Articles