Re: How to create a user prompt to import multiple data files from a user selected path and user selected "Set Name Filter"?Hello @Neo,
This should get you started. No Multiple File Import window will pop-up, it's built into the functionality of the new window. It's not pretty, but it works. Notice the items that happen only after the user presses the "OK" button. Hope this helps!
Names default to here(1);
// Creates window and asks user to a name to user for filtering
name_filter_win = New window( "Name filter",
vbox = v splitter box( // Contains 3 elements
// Element 1: Title
text box( "Enter file name filter" ),
// Element 2: Text input box
name_filter = Text edit box( "" ),
// Element 3: Button & script that runs after it's pressed
Button Box( "OK",
mfi_name_filter = name_filter << Get text(); // Gets text from text box
pick_dir = Pick directory( "Select a folder" ); // User chooses destination folder
Eval( // Multiple file import code
eval expr(
Multiple File Import(
<<SET folder=""></SET>Re: How to create a user prompt to import multiple data files from a user selected path and user selected "Set Name Filter"?@StarfruitBob . Thanks. I made some changes under Multiple File Import block and the script now has the basic functionality needed. There are few improvements I would like to make.
- Make the "Name Filter" window modal. Update: This I have done now.
- Pre join additional text and post join an asterix (wild card) to construct mfi_name_filter. Update: This I have done now.
- Have only JMP files visible inside the window when user chooses the files. This functionality is important. Struggling to do.
- Count the number of JMP files in the selected folder and report if more than two. Warn the user of more that two files and stop further execution if more than two JMP files are present. Not there yet.
Any help is appreciated. I will try my hand for items 1 and 2 but am unsure how to implement 3 and 4. For item 3, Do I need to use Pick File for this in place of Pick Directory?
Re: How to create a user prompt to import multiple data files from a user selected path and user selected "Set Name Filter"?3. In the name filter, you should be able to add *.jmp, which is only jmp data tables.
4. You'll still need pick directory, but you will need to add in Pick file.
4a. Pick file will return a list of all files in the directory specified, this includes both *.jmp files and ones that are not.
4b. You will need to remove from( list of files from Pick file, anything that has last 3 character that are not jmp )
This will leave you with a list of the files, specified by Pick Directory, only ending in jmp.
After 4, you can do N Items( Pick file list ) = # of *.jmp files in the directory. Does this make sense?
If anyone has an easier way of doing this, please let us know!
Re: How to create a user prompt to import multiple data files from a user selected path and user selected "Set Name Filter"?I suggest you take the time to read the section on Multiple File Import in the Scripting Guide, in the JMP Documentation, accessed through the Help pull down menu. It has an example of finding specific files, and then opening MFI with only the found files displayed.

How to create a user prompt to import multiple data files from a user selected path and user selected "Set Name Filter"?I would like to create a user prompt dialog box using the Multiple File Import() function, which asks the user for
File Name Filter
(which goes to Set Name Filter. Default filter in the user input field could be Test_ABC* (note with wild card))
Path to Files
(default could be My Documents, but user needs to be able to browse to where the actual files are. This path goes to the folder field in Multiple File Import)
Only two files are to be selected in my case. So in the Multiple File Import window only two files Set Name Filter are expected to be active, rest greyed out.
Clicking OK button on the user prompt dialog box, both files should be imported with the functionality of passing the smaller sized file to data_file1 and the larger sized file to data_file2. data_file1 and data_file2 are to be referenced in my script after this user input prompt.
Clicking Cancel button should abort the stop any further execution.
How to do this in JSL?
Content Organization