cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Learn how to build custom Python data connectors and further customize JMP’s Data Connector Framework with the Python Data Connector Demo, available now in the JMP Marketplace!
  • See how to use Accelerated Life Testing (ALT) to evaluate reliability. Register for June 5 webinar, 2pm US Eastern Time.

Discussions

Solve problems, and share tips and tricks with other JMP users.
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