cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Browse apps to extend the software in the new JMP Marketplace
Choose Language Hide Translation Bar
terapin
Level VI

JSL Retrieve path after Open | Pick File

I'm creating an interface for coworkers to use so they can start a reasonable directory and then navigate to a specific location where their data files exist and open them.  I want to save just the path they navigated to for future use in the JSL code.  I can't seem to figure out how to accomplish this though.  Any suggestions would be greatly appreciated.

 

Names Default To Here( 1 );

Set Path Variable( "dir_rawdata", "C:\" );

dt = Open(
	Pick File( "Select Data File ", "$dir_rawdata/", {"CSV Files|csv", "All Files|*"} ),
	Import Settings(
		End Of Line( CRLF, CR, LF ),
		End Of Field( Comma, CSV( 1 ) ),
		Strip Quotes( 1 ),
		Use Apostrophe as Quotation Mark( 0 ),
		Scan Whole File( 1 ),
		Treat empty columns as numeric( 0 ),
		CompressNumericColumns( 0 ),
		CompressCharacterColumns( 0 ),
		CompressAllowListCheck( 0 ),
		Labels( 1 ),
		Column Names Start( 2 ),
		Data Starts( 3 ),
		Lines To Read( "All" ),
		Year Rule( "20xx" )
	)
);			
	

 

1 ACCEPTED SOLUTION

Accepted Solutions

Re: JSL Retrieve path after Open | Pick File

Save the result returned by Pick File in a variable. You can use various character string functions to obtain the path from this string.

View solution in original post

2 REPLIES 2

Re: JSL Retrieve path after Open | Pick File

Save the result returned by Pick File in a variable. You can use various character string functions to obtain the path from this string.

terapin
Level VI

Re: JSL Retrieve path after Open | Pick File

Thanks Mark,

 

I'll try what you suggested.