cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Choose Language Hide Translation Bar
0 Kudos

Data Table : get reports (and other options)

What inspired this wish list request? 

When a user want to add new rows to a data table or when he wants to sort the data table there is a risk that this is not possible in Jmp due to open reports.
How to update table after sorting? 
Worst case: The JSL script just stops with an error message telling the user:

hogi_0-1689598360151.png

 

Often the report has no issue with the ordering or the rows, it just needs a refresh.

 

What is the improvement you would like to see? 

Please fix the problem.

 

Different approaches: 

  1. All the user to update the table (add rows, sort the table) and trigger the reports to refresh.
  2. If there are reports which actually have an issue with the changes in the data table, ask the user if it's OK to close them.
    For JSL, don't ask the user, provide an option:
    sort(..., close reports with issues());
  3. Does an option like 
    sort( ..., ignoreEffectsOnReports())
    make sense?
  4. Provide a function
    myAffectedReports = dt << get reports with issues();​
    which returns a list of reports with issues with added rows or sorted data tables.
    Then the user can close the reports if he wants to.

  5. at least: 
    Provide a function 
    myReports = dt << get reports();
    which returns a list with all reports with a link to the data table.
    ... independent of the actual name of the Window:  How to sort the data table within an application? 
    Then the user can decide how he wants to continue ...

 

 

Why is this idea important? 

With the current behavior of Jmp some actions like adding rows or sorting data tables are not possible when a report is open.

In other programs, such actions can be performed without issues.


There are several possibilities how to improve the situation for Jmp users.

Best case: full functionality behind the scenes - without bothering the user at all.

 

 

 

 

more wishes submitted by  hogi_2-1702196401638.png

2 Comments
hogi
Level XII

Workaround: get ALL reports and select those which belong to dt.

https://community.jmp.com/t5/Discussions/How-to-update-table-after-sorting/m-p/660847/highlight/true... 

closeMyReports = Function( {dt},
	{default local},
	AllmyReports = {};
	myReports = Get Window List( Type( "Reports" ) );
	For Each( {rep}, myReports,
		Try(
			myList = (rep << Xpath( "//OutlineBox" )) << get scriptable Object();
			myDTs = Transform Each( {scriptableObject}, myList, If( Is Empty( scriptableObject ), ., scriptableObject << Get Data Table() ) );
			If( Contains( myDTs, dt ),
				Insert Into( AllmyReports, rep )
			);
		)
	);
	If( N Items( AllmyReports ) > 0,
		If(
			ex = New Window( "",
				<<Type( "Modal Dialog" ),
				<<Return Result,
				V List Box( Text Box( "open reports detected.\!nOK to close them?" ), H List Box( Button Box( "OK" ), Button Box( "Cancel" ) ) )
			);
			ex["button"] == 1;
		,
			AllmyReports << close window(),
			Stop()
		)
	);
);

dt = current data table();
closeMyReports(dt)
hogi
Level XII