cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • JMP Security Notice: CVE-2026-109618 and CVE-2026-109619

    JMP promptly initiated a review of its products, services, and relevant infrastructure for exposure to CVE-2026-109618 and CVE-2026-109619.

    Our assessment of JMP products has not identified exposure to these vulnerabilities. Where remediation was required within supporting environments, appropriate security updates and controls have been applied and validated.

    We have identified no evidence of successful exploitation or unauthorized access to JMP systems or customer information associated with these vulnerabilities.

    JMP continues to monitor the issue and relevant vendor guidance. No action is required by JMP customers at this time.

  • Don’t miss your chance to experience Discovery Summit Europe at our best available rate! Early bird registration through 31 Oct.
  • Graph Builder Toolbar streamlines interactive graphing. Creates shortcuts on Report and GraphBuilder Helpers toolbars. Download and install the extension.

Discussions

Solve problems, and share tips and tricks with other JMP users.
Choose Language Hide Translation Bar
Dib-Dey
Level III

How to auto-run attached scripts on a table pulled from database

Following code will attach all jsl scripts in c:\work directory to the table dt. 

 

Do you know any function/command which can also make it auto-run on the table?

 

dt = Current Data Table();
dir = "C:\work";
fileNames = Files In Directory( dir );
if (dir!="",
	For( iFile = 1, iFile <= N Items( fileNames ), iFile++,
			filename = fileNames[iFile];
			show(filename);
			
			If( Ends With( filename, ".jsl" ),
				file_path = dir || "\" || filename;
				show(file_path);
				x = Load Text File( file_path );
				Eval( Parse( "dt << new script(filename," || x || ")" ) );
			);
		);
);
1 REPLY 1
txnelson
Super User

Re: How to auto-run attached scripts on a table pulled from database

The

dt << run scripts( filename );

will run the script after it has been saved to the data table.

dt = Current Data Table();
dir = "C:\work";
fileNames = Files In Directory( dir );
if (dir!="",
	For( iFile = 1, iFile <= N Items( fileNames ), iFile++,
			filename = fileNames[iFile];
			show(filename);
			
			If( Ends With( filename, ".jsl" ),
				file_path = dir || "\" || filename;
				show(file_path);
				x = Load Text File( file_path );
				Eval( Parse( "dt << new script(filename," || x || ")" ) );
				dt << run scripts( filename );
			);
		);
);

If you want all of the scripts run whenever the data table is opened, you can add a table script called OnOpen where you could specify to run each of the table scripts.

Jim

Recommended Articles