Share your ideas for the JMP Scripting Unsession at Discovery Summit by September 17th. We hope to see you there!
Choose Language Hide Translation Bar
Highlighted
dileepkr
Level III

File selection input box in JMP Application builder

Hi,

 

I am creating a JMP application which would open a xlsx workbook, load individual sheets into datatables in background and link the datatables to Graph building JSL script buttons in JMP app. 

Is there a way to create a file selection input box in JMP Application builder, where in user can browse and select the xlsx workbook from the app?

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
cwillden
Super User

Re: File selection input box in JMP Application builder

Definitely.  Just create a button box and give it a script that does a pick file. Here, I just have a button box and an empty text box named "file_path_text".  For the button box script, I just type in "On Select".

GUI.pngThen in the script window, I define On Select like so:

script.png

On Select = expr(
	file_path = Pick File(
		"Select Excel File",
		"$DOCUMENTS",
		{"Excel|xls;xlsx"}
	);
	
	file_path_text << Set Text(file_path)
);

When you run it, you should see your selected file printed in the previously empty text box showing the path of your previously selected file.  Use "dt = open(file_path)" to open the selected file when you're script is ready to start working with the selected file.

-- Cameron Willden

View solution in original post

2 REPLIES 2
Highlighted
cwillden
Super User

Re: File selection input box in JMP Application builder

Definitely.  Just create a button box and give it a script that does a pick file. Here, I just have a button box and an empty text box named "file_path_text".  For the button box script, I just type in "On Select".

GUI.pngThen in the script window, I define On Select like so:

script.png

On Select = expr(
	file_path = Pick File(
		"Select Excel File",
		"$DOCUMENTS",
		{"Excel|xls;xlsx"}
	);
	
	file_path_text << Set Text(file_path)
);

When you run it, you should see your selected file printed in the previously empty text box showing the path of your previously selected file.  Use "dt = open(file_path)" to open the selected file when you're script is ready to start working with the selected file.

-- Cameron Willden

View solution in original post

Highlighted
dileepkr
Level III

Re: File selection input box in JMP Application builder

Thank you so much for the solution!
Article Labels

    There are no labels assigned to this post.