cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Submit your abstract to the call for content for Discovery Summit Americas by April 23. Selected abstracts will be presented at Discovery Summit, Oct. 21- 24.
Discovery is online this week, April 16 and 18. Join us for these exciting interactive sessions.
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.