I've written a fairly complex JSL application using the JMP Application Builder. The application launcher prompts the user for column selections and then I sort the data by the chosen columns before continuing with processing and visualizations.
If the data set has dependent open windows, I need to give the user the option to continue without sorting (the data was likely pre-sorted) or exit the script to let the user deal with the dependent windows. To this end, I've created the following function:
sortThisData = Function ({dt},
try( dt << Sort (By( Column(snCol), Column(dtCol)), Replace Table) ,
/* IF thrown */
if (contains(exception_msg[1], "JMP cannot replace the existing table"),
ex = New Window( "Alert", <<MODAL></MODAL>
However, it seems that the application itself counts as a dependent open window! I can't sort the data even if no other windows are open.
How can I circumvent this issue and sort my data? I have moved the timing of calling my SORT function, but it needs to happen after the OK button on the launcher was pressed and before the processing/visualizations are done.
Any suggestions?