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
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