cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Try the Materials Informatics Toolkit, which is designed to easily handle SMILES data. This and other helpful add-ins are available in the JMP® Marketplace
Choose Language Hide Translation Bar
Steven_Moore
Level VI

Scripting/Row State Columns

I have a data table with several Row State columns.  I also have several scripts saved to the data table for analysis.  Each script requires its own Row States, so I have to remember which Row State column goes with which script and then copy to Row States from the columns.  Is there a way to edit my scripts to set the correct row states before the analysis is done?  Thanks for any help!

Steve
1 ACCEPTED SOLUTION

Accepted Solutions
txnelson
Super User

Re: Scripting/Row State Columns

My background started much the same as yours.  JSL is a powerful language that one keeps learning more and more about it.

P.S.

Please click on the "Correct Answer" button to mark this discussion as Answered to help the responders quickly identify it as having been responded to.

Thanks

Jim

View solution in original post

5 REPLIES 5
txnelson
Super User

Re: Scripting/Row State Columns

All you need to do, is to add to the top of your script the jsl to copy the rowstate column to the rowstates before your do the analysis.  Assuming the rowstate column is called RowState_1, all that you have to do is to have the following at the beginning of your script:

Names Default to Here( 1 );

dt=current data table();

dt:RowState_1 << Copy to Row States();


Jim
Steven_Moore
Level VI

Re: Scripting/Row State Columns

  Jim,

Here is the script I am trying to run with the three lines added that you suggest..  My Row State column is "Break - Cause Not Known".  Now this script will not run.  What am I missing?

THANKS!!!

 

Names Default to Here( 1 )

dt=current data table();

 

dt:Break - Cause Not Known << Copy to Row States();

 

 

Graph Builder(Size( 661, 500 ),Variables( X( :Downtime Category ), Y( :Total Minutes Down ), Overlay( :Crew ) ),Elements(Bar(X,Y,Legend( 7 ),Summary Statistic( "N" ),Label( "Label by Value" ))),SendToReport(Dispatch({},"graph title",TextEditBox,{Set Text("Line 180:  Number Of Stops By Category By Crew - January 2016)}),Dispatch( {}, "X title", TextEditBox, {Set Text( "" )} ),Dispatch( {}, "Y title", TextEditBox, {Set Text( "Number Of Stops" )} )))

 

Steve
txnelson
Super User

Re: Scripting/Row State Columns

The column "Break - Cause Not Known" is being parsed by JMP as being an assignment statement.  This is because of the "-" in the name.  Change the statement to:

dt:Name("Break -  Cause Not Known")<<Copy to Row States();

Jim
Steven_Moore
Level VI

Re: Scripting/Row State Columns

Got it!  The name of the Row State column has to be in quotes!  Works great!  Thanks!!!!!!  The JSL is all Greek to me - I am an old Fortran/Basic guy and my brain does not seem to be wired for JSL....YET.

Steve
txnelson
Super User

Re: Scripting/Row State Columns

My background started much the same as yours.  JSL is a powerful language that one keeps learning more and more about it.

P.S.

Please click on the "Correct Answer" button to mark this discussion as Answered to help the responders quickly identify it as having been responded to.

Thanks

Jim