Subscribe Bookmark RSS Feed

Scripting/Row State Columns

Steven_Moore

Super User

Joined:

Jun 4, 2014

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
Solution

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
5 REPLIES
txnelson

Super User

Joined:

Jun 22, 2012

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

Super User

Joined:

Jun 4, 2014

  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

Joined:

Jun 22, 2012

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

Super User

Joined:

Jun 4, 2014

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
Solution

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