Scripting Guide > Extending JMP > Share Content on JMP Live > Publish Reports or Data to JMP Live
Publication date: 07/15/2025

Publish Reports or Data to JMP Live

Using JSL, you can publish JMP reports or data tables to a folder on JMP Live. Individuals or groups who have access to the folder can see the content that you published.

Publish to an Existing Folder

To publish reports or data to JMP Live, you need to tell JMP Live which folder to put the content in. If your JMP Live site supports personal spaces, you might want to publish to your personal space first.

To publish to the root folder of your personal space, enter a tilde (~) as a shortcut.

To publish to another location, specify the ID or the full path of the folder. For example, to publish to a folder named Results in a space named Tests, the full path would be /Tests/Results.

Example of Publishing to an Existing Folder in Your Personal Space

This example publishes a Graph Builder report to the root folder in your personal space.

Names Default To Here( 1 );
// Open the Big Class data table.
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
// Run the Graph Builder table script and call the report gbsmoother.
gbsmoother = dt << Run Script( "Graph Builder Smoother Line" );
// Create a connection to the JMP Live server.
liveconnection = New JMP Live();
// Create a content object containing the gbsmoother report.
content = New JMP Live Content( gbsmoother );

/* Publish the content to your personal space. Use the JMP Live Connection that you established and return a JMP Live Result object called jmpliveresult. */

jmpliveresult = liveconnection << Publish( content, Folder( "~" ) );
// Close all data tables without saving.
Close All( Data Tables, NoSave );

Publish to a New Folder

When publishing, you can create a new folder on JMP Live. When you create a new folder, you specify where to create it (the folder it resides in), the folder title, and an optional description.

Example of Publishing to a New Folder in Your Personal Space

This example creates a new folder named Create Folder Example in your personal space and then publishes content to that folder.

Names Default To Here( 1 );
// Create a connection to the JMP Live server.
liveconnection = New JMP Live();

/* Create a folder in your personal space with a title and a description. Use the JMP Live Connection that you established and return a JMP Live Result object called jmpliveresult. */

jmpliveresult = liveconnection << Create Folder( Parent Folder( "~" ), Title( "Create Folder Example" ), Description( "Folder created in the scripting index example script."), If Exists( "use" ) );
// Obtain the JMP Live Folder object from the result.
folder = jmpliveresult << As Scriptable;

// Create a report to publish using the Big Class data table.

dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
gbsmoother = dt << Run Script( "Graph Builder Smoother Line" );

// Create a content object containing the gbsmoother report

content = New JMP Live Content( gbsmoother, Title( "My Smoother Graph" ) );
// Publish the report to the new folder using the JMP Live Folder object that was obtained from the Create Folder operation above.
jmpliveresult = liveconnection << Publish( content, Folder( folder ) );

// Close all data tables without saving.

Close All( Data Tables, NoSave );

Additional Publishing Examples

When specifying the folder for JMP Live to publish to, you have three options:

1. Provide the full path to the folder. Here are some example paths:

"~/Practice" - Specifies a folder named Practice in your personal space.

"/Fab/Litho/Results" - Specifies a subfolder named Results in a folder named Litho in a space called Fab.

2. Provide the ID of the folder. To find the folder ID in JMP Live, click on the folder. The folder ID appears in the URL, or you can copy the ID under Details.

3. Provide a JMP Live Folder object that was returned by the Create Folder or Get Folder messages to JMP Live Connection or JMP Live Folder.

This example creates a new folder and publishes a report to it, identifying the folder by ID. It assumes that a space named Fab exists on JMP Live.

Names Default To Here( 1 );
// Open the Big Class data table.
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
// Run the Graph Builder table script and call the report gbsmoother.
gbsmoother = dt << Run Script( "Graph Builder Smoother Line" );
// Create a connection to the JMP Live server.
liveconnection = New JMP Live();

/* Create a folder in the Fab space and give it a title. Use the JMP Live Connection that you established and return a JMP Live Result object called jmpliveresult. */

jmpliveresult = liveconnection << Create Folder( Parent Folder ( "/Fab" ), Title( "Publish Example" ), If Exists( "use" ) );
// Obtain the JMP Live Folder object from the result and get its ID.
folder = jmpliveresult << As Scriptable;
folderID = folder << Get ID;
// Create a content object containing the gbsmoother report.
content = New JMP Live Content( gbsmoother, Title( "My Smoother Graph" ) );

/* Publish the content to the newly created folder. Use the JMP Live Connection that you established and return a JMP Live Result object called jmpliveresult. */

jmpliveresult = liveconnection << Publish( content, Folder( folderID ) );
// Close all data tables without saving.
Close All( Data Tables, NoSave );

This example creates a new folder and publishes a data table to it, identifying the folder by path. It assumes that a space named Fab exists on JMP Live.

Names Default To Here( 1 );
// Create a connection to the JMP Live server.
liveconnection = New JMP Live();

// Create a folder in the Fab space and give it a title.

liveconnection << Create Folder( Parent Folder( "/Fab" ), Title( "Publish Data Example" ), If Exists( "use" ) );
// Create a content object containing the Big Class data table.
content = New JMP Live Content( Data( "$SAMPLE_DATA/Big Class.jmp" ) );

/* Publish the content to the newly created folder. Use the JMP Live Connection that you established and return a JMP Live Result object called jmpliveresult. */

jmpliveresult = liveconnection << Publish( content, Folder( "/Fab/Publish Data Example" ) );
// Close all data tables without saving.
Close All( Data Tables, NoSave );

This example creates a new folder in your personal space and publishes two Graph Builder reports to the folder, using the JMP Live Folder object obtained from Create Folder to identify the folder.

Names Default To Here( 1 );
// Open the Big Class data table.
bc = Open( "$SAMPLE_DATA/Big Class.jmp" );
/* Run two Graph Builder table scripts and call the reports gbsmoother and gbline. */
gbsmoother = bc << Run Script( "Graph Builder Smoother Line" );
gbline = bc << Run Script( "Graph Builder Line and Bar Charts" );
// Create a connection to the JMP Live server.
liveconnection = New JMP Live();

/* Create a folder in your personal space with a title. Use the JMP Live Connection that you established and return a JMP Live Result object called jmpliveresult. */

jmpliveresult = liveconnection << Create Folder( Parent Folder ( "~" ), Title( "Multiple Reports Example" ), If Exists( "use" ) );
// Obtain the JMP Live Folder object from the result.
folder = jmpliveresult << As Scriptable;
// Create a content object containing the gbsmoother report.
content1 = New JMP Live Content( gbsmoother, Title( "My Smoother Graph" ) );
// Create a content object containing the gbline report.
content2 = New JMP Live Content( gbline, Title( "My Line Graph" ) );
// Publish content1 and content2 (in a list) to the newly created folder.
jmpliveresult = liveconnection << Publish( {content1, content2}, Folder( folder ) );
// Close all data tables in JMP without saving.
Close All( Data Tables, NoSave );
Want more information? Have questions? Get answers in the JMP User Community (community.jmp.com).