cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Try the Materials Informatics Toolkit, which is designed to easily handle SMILES data. This and other helpful add-ins are available in the JMP® Marketplace
Choose Language Hide Translation Bar
BSwid
Level IV

How to save a datatable as a script (how to save a datatable as JSL) in JMP

How to save a datatable as a script.  It's easy but when I Google it the top results aren't the answer. So I'm going to answer my own question.

1 ACCEPTED SOLUTION

Accepted Solutions
BSwid
Level IV

Re: How to save a datatable as a script (how to save a datatable as JSL) in JMP

This is also useful for learning JSL.  You can create and format columns, also formulas, and see the JSL for it.

1. Create datatable.

2. Red hot spot for scripts - > Copy Table Script

3. Red hot spot for scripts -> New Script

4. Give the script a title, paste the script, save.

 

 

SaveDatatableAsScript.png

 

New Table( "Slider Test",
	Add Rows( 26 ),
	Set Header Height( 47 ),
	New Column( "SKU",
		Character,
		"Nominal",
		Set Selected,
		Set Values(
			{"A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N",
			"O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"}
		)
	),
	New Column( "Sales",
		Numeric,
		"Continuous",
		Format( "Best", 12 ),
		Set Values(
			[98, 64, 120, 397, 93, 58, 196, 700, 674, 229, 607, 55, 590, 169, 1449,
			1236, 143, 1714, 364, 404, 226, 1300, 1105, 144, 1391, 1893]
		),
		Set Display Width( 94 )
	),
	New Column( "ABC Class",
		Character,
		"Nominal",
		Set Values(
			{"C", "C", "B", "B", "C", "C", "B", "B", "B", "B", "B", "C", "B", "B",
			"A", "A", "B", "A", "B", "B", "B", "A", "A", "B", "A", "A"}
		),
		Set Display Width( 70 )
	)
)

View solution in original post

2 REPLIES 2
BSwid
Level IV

Re: How to save a datatable as a script (how to save a datatable as JSL) in JMP

This is also useful for learning JSL.  You can create and format columns, also formulas, and see the JSL for it.

1. Create datatable.

2. Red hot spot for scripts - > Copy Table Script

3. Red hot spot for scripts -> New Script

4. Give the script a title, paste the script, save.

 

 

SaveDatatableAsScript.png

 

New Table( "Slider Test",
	Add Rows( 26 ),
	Set Header Height( 47 ),
	New Column( "SKU",
		Character,
		"Nominal",
		Set Selected,
		Set Values(
			{"A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N",
			"O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"}
		)
	),
	New Column( "Sales",
		Numeric,
		"Continuous",
		Format( "Best", 12 ),
		Set Values(
			[98, 64, 120, 397, 93, 58, 196, 700, 674, 229, 607, 55, 590, 169, 1449,
			1236, 143, 1714, 364, 404, 226, 1300, 1105, 144, 1391, 1893]
		),
		Set Display Width( 94 )
	),
	New Column( "ABC Class",
		Character,
		"Nominal",
		Set Values(
			{"C", "C", "B", "B", "C", "C", "B", "B", "B", "B", "B", "C", "B", "B",
			"A", "A", "B", "A", "B", "B", "B", "A", "A", "B", "A", "A"}
		),
		Set Display Width( 70 )
	)
)
Craige_Hales
Super User

Re: How to save a datatable as a script (how to save a datatable as JSL) in JMP