For the latest version of JMP Help, visit JMP.com/help.


Scripting Guide > Extending JMP > Share Reports on JMP Live > Search for a JMP Live Report or Folder ID
Publication date: 11/10/2021

Search for a JMP Live Report or Folder ID

For many JSL functions, you need to know the report or folder ID. Using JSL, you can search by keyword (in the title or description) or by the publisher of the report or folder. If your search may return many results, you can specify how many results to return at a time.

The following example searches all reports that contain the word "Production" in the title or description, and are published by a user with the display name "dianesmith". It also specifies that the search will return up to ten items at a time.

/* Search for reports with the keyword Production that are published by the user dianesmith. Return no more than 10 results at a time. */

liveresult = liveconnection << Find Reports( Search( "Production" ), Publisher( "dianesmith" ), ( PageSize( 10 ));
// Change the liveresult into JMP Live Reports and make them scriptable.
livereports = liveresult << As Scriptable();
// Show how many results are returned.
show( livereports << Get Number Of Items());
// Return the first report in list of results.
report1 = livereports[ 1 ];
// Show the title of the first report.
show( report1 << Get Title());

In the example above, if you might have more than ten results, you can page through them using the Next and Previous functions:

// Put the next 10 results into the next page.
nextpage = livereports << Next();
// Show the current page number.
show( livereports << Get Current Page Number());
// Get the first item in the list of items in the next page.
next1 = nextpage[ 1 ];
// Show the title of the first report.
show( next1 << Get Title());
// Show the number of items in the current page.
show( nextpage << Get Number Of Items());

If Next() finds no further pages, an error appears, which you should catch to proceed with further processing.

Tip: If you know the number of pages to expect, you can jump directly to a page. See the Get Page function in the JMP Scripting Index at Help > Scripting Index.

Want more information? Have questions? Get answers in the JMP User Community (community.jmp.com).