cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Sign-in to the JMP Community will be unavailable intermittently Dec. 6-7 due to a system update. Thank you for your understanding!
  • We’re retiring the File Exchange at the end of this year. The JMP Marketplace is now your destination for add-ins and extensions.
  • JMP 19 is here! Learn more about the new features.

Discussions

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

Pick File: Syntax of filterList argument

I am having trouble using the pick file command, in particular the filterList argument, and unfortunately, the scripting index does not cover my case.

I want to set the filter to only csv (or Text files) during selection, as I can when using Open, and tried

Names Default To Here( 1 );
mypath = Pick File(
	"Select csv File",
	{"Text Files|txt;csv"}

);

but when executing the script, the filter is set to *.*| All Files, which is not what I want.

 

Has somebody a link for me where I can find all possible valid arguments for the filterList (in the scipting index, I can only find "JMP Files|jmp;jsl;jrn", "All Files|*")?

Is there a way in JMP to get all possibilities of an argument of a function, like it's, e.g., done in the online Matlab help?

 
 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Pick File: Syntax of filterList argument

And if you do not have a default directory to start with, leave that argument blank. To do so, you still need the comma separator for the arguments so that JMP understands that the list is the third argument, like this:

 

Names Default To Here( 1 );
mypath = Pick File(
	"Select csv File",
	,
	{"Text Files|txt;csv"}
);

It might look strange, but this syntax is correct.

View solution in original post

2 REPLIES 2
txnelson
Super User

Re: Pick File: Syntax of filterList argument

It is a bit confusing, but you have to specify an Initial Directory, to be able to use the filter

Names Default To Here( 1 );
mypath = Pick File(
	"Select csv File",
	"$DOCUMENTS",
	{"Text Files|txt;csv"}
);
Jim

Re: Pick File: Syntax of filterList argument

And if you do not have a default directory to start with, leave that argument blank. To do so, you still need the comma separator for the arguments so that JMP understands that the list is the third argument, like this:

 

Names Default To Here( 1 );
mypath = Pick File(
	"Select csv File",
	,
	{"Text Files|txt;csv"}
);

It might look strange, but this syntax is correct.

Recommended Articles