cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Instantly extract effect sizes, F-ratios, and FDR-adjusted p-values from your models with the Calculate Effects Sizes extension, available now in the JMP Marketplace!
  • New to JMP? Join us Sept. 23-24 for the Early User Edition of Discovery Summit, tailor-made for new users. Register now for free!
  • See how to use the JMP Marketplace – Free tools to expand JMP capabilities. Register. July 10, 2 pm US Eastern Time.

Discussions

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

Include() with Wildcards

I have a main script that calls exterior JSL scripts depending on the content of a particular column.  The exterior JSL scripts themselves and their names are revised periodically to reflect spec changes.  Can wildcards be used with Include() to bypass any naming change to the script that gets called?


Slán



SpannerHead
2 ACCEPTED SOLUTIONS

Accepted Solutions
jthi
Super User

Re: Include() with Wildcards

I don't think so but if the file is always in same folder, you can figure out which file you should include by first checking all file names.

-Jarmo

View solution in original post

SpannerHead
Level VI

Re: Include() with Wildcards

A friend at work made a similar suggestion.

 

This appears to work.

 

Script_Options = Files in Directory("\\Directory Name\");


//Keyphrase is the unique string to identify the script that should execute

For( i = 1, i <= N Items( Script_Options ), i++,
	If( Contains( Script_Options[i], "Keyphrase" ), scripttorun = Script_Options[i]););

	Chosen = "\\Directory Name\"||scripttorun;
		
	Include(Chosen); 

 


Slán



SpannerHead

View solution in original post

2 REPLIES 2
jthi
Super User

Re: Include() with Wildcards

I don't think so but if the file is always in same folder, you can figure out which file you should include by first checking all file names.

-Jarmo
SpannerHead
Level VI

Re: Include() with Wildcards

A friend at work made a similar suggestion.

 

This appears to work.

 

Script_Options = Files in Directory("\\Directory Name\");


//Keyphrase is the unique string to identify the script that should execute

For( i = 1, i <= N Items( Script_Options ), i++,
	If( Contains( Script_Options[i], "Keyphrase" ), scripttorun = Script_Options[i]););

	Chosen = "\\Directory Name\"||scripttorun;
		
	Include(Chosen); 

 


Slán



SpannerHead

Recommended Articles