数据表:获取报告(和其他选项)是什么激发了这个愿望清单请求?
当用户想要向数据表添加新行或者想要对数据表进行排序时,由于打开的报告,在 Jmp 中存在无法实现此操作的风险。
排序后如何更新表?
最坏的情况:JSL 脚本只是停止并显示一条错误消息,告诉用户:

通常,报表的顺序或行没有问题,只是需要刷新。
您希望看到什么改进?
请解决问题。
不同的方法:
- 所有用户更新表(添加行、对表排序)并触发报表刷新。
- 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());
- Does an option like
sort( ..., ignoreEffectsOnReports())
make sense? - 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.
- 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: 如何在应用程序中对数据表进行排序?
Then the user can decide how he wants to continue ...
为什么这个想法很重要?
根据 Jmp 当前的行为,打开报表时无法执行某些操作,例如添加行或对数据表进行排序。
在其他程序中,可以毫无问题地执行此类操作。
如何改善 Jmp 用户的情况有多种可能性。
最好的情况:在幕后提供完整的功能 - 完全不打扰用户。
更多愿望提交者
自动化和脚本编写回复:数据表:获取报告(和其他选项)解决方法:获取全部报告并选择属于 dt 的报告。
https://community.jmp.com/t5/Discussions/How-to-update-table-after-sorting/mp/660847/highlight/true#M84975
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></TYPE>回复:数据表:获取报告(和其他选项)类似问题:
表格:列出所有链接的子集