cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Instantly extract effect sizes, F-ratios, and FDR-adjusted p-values from your models with the Calculate Effects Sizes extension, available now in the JMP Marketplace!
  • New to JMP? Join us Sept. 23-24 for the Early User Edition of Discovery Summit, tailor-made for new users. Register now for free!
  • Your voice matters! Tell us how you prefer to receive JMP updates, so we can tailor our communication to your needs. Take short survey.

Discussions

Solve problems, and share tips and tricks with other JMP users.
Choose Language Hide Translation Bar
mosiph_ct
Level I

Issue in JMP16 with Get Rows Where

Hi,

 

I have the following piece of code that works in earlier JMP versions but stops working in JMP 16.

 

 

//*****Set Working Directory*****//
PCName = Get Environment Variable("COMPUTERNAME");
WorkingPath_Settings_File = Get Path Variable("DOCUMENTS") || "WorkingPath_Settings.xlsx";
dt_WorkingPath = Open(WorkingPath_Settings_File, invisible);
rowindex_list = dt_WorkingPath << Get Rows Where(:PCName == PCName);
If(NItems(rowindex_list) == 0,
	rowindex = 1,
	rowindex = rowindex_list[1]
);
WorkingPath = dt_WorkingPath:WorkingPath[rowindex];
Close(dt_WorkingPath, NoSave);

The error occurs at line:

rowindex_list = dt_WorkingPath << Get Rows Where(:PCName == PCName);

Error:

Name Unresolved: PCName at row 1 in access or evaluation of 'PCName' , :PCName/*###*/

 

Thank you for your help.

 

1 ACCEPTED SOLUTION

Accepted Solutions
txnelson
Super User

Re: Issue in JMP16 with Get Rows Where

I found that my xlsx file was not reading in the data with row 1 as the column headers.  I changed the open statement to the below, and then the code worked without error

dt_WorkingPath = Open( WorkingPath_Settings_File, invisible,
	Worksheets( "Sheet1" ),
	Use for all sheets( 1 ),
	Concatenate Worksheets( 0 ),
	Create Concatenation Column( 0 ),
	Worksheet Settings(
		1,
		Has Column Headers( 1 ),
		Number of Rows in Headers( 1 ),
		Headers Start on Row( 1 ),
		Data Starts on Row( 2 ),
		Data Starts on Column( 1 ),
		Data Ends on Row( 0 ),
		Data Ends on Column( 0 ),
		Replicated Spanned Rows( 1 ),
		Replicated Spanned Headers( 0 ),
		Suppress Hidden Rows( 1 ),
		Suppress Hidden Columns( 1 ),
		Suppress Empty Columns( 1 ),
		Treat as Hierarchy( 0 ),
		Multiple Series Stack( 0 ),
		Import Cell Colors( 0 ),
		Limit Column Detect( 0 ),
		Column Separator String( "-" )
	) );
Jim

View solution in original post

2 REPLIES 2
txnelson
Super User

Re: Issue in JMP16 with Get Rows Where

I found that my xlsx file was not reading in the data with row 1 as the column headers.  I changed the open statement to the below, and then the code worked without error

dt_WorkingPath = Open( WorkingPath_Settings_File, invisible,
	Worksheets( "Sheet1" ),
	Use for all sheets( 1 ),
	Concatenate Worksheets( 0 ),
	Create Concatenation Column( 0 ),
	Worksheet Settings(
		1,
		Has Column Headers( 1 ),
		Number of Rows in Headers( 1 ),
		Headers Start on Row( 1 ),
		Data Starts on Row( 2 ),
		Data Starts on Column( 1 ),
		Data Ends on Row( 0 ),
		Data Ends on Column( 0 ),
		Replicated Spanned Rows( 1 ),
		Replicated Spanned Headers( 0 ),
		Suppress Hidden Rows( 1 ),
		Suppress Hidden Columns( 1 ),
		Suppress Empty Columns( 1 ),
		Treat as Hierarchy( 0 ),
		Multiple Series Stack( 0 ),
		Import Cell Colors( 0 ),
		Limit Column Detect( 0 ),
		Column Separator String( "-" )
	) );
Jim
mosiph_ct
Level I

Re: Issue in JMP16 with Get Rows Where

It works great now. Thank you.

Recommended Articles