I'm trying to set up a JSL script that will take the user to the last row(or any specific row) in the table upon opening. I have it working for standalone tables by using the On Open script property and the Go To Row() message. I have found, however, that this does not work when the table is procedurally generated from a script (i.e. from a standalone SQL query with custom formatting scripts).
I have tried both the Go To Row() and Select Rows() combined with Next/Previous Selected and neither have the expected effect. The targeted row gets selected, but the table does not scroll to show the selected row. I don't get any errors in the debugger log so I assume the line runs fine.
Is there a seperate trick to getting table messages to run in JMP13?
Solved! Go to Solution.
Thanks, that worked, but I'm confused as to why.
In terms of script time, the script as a whole takes ~4-6 seconds to run completely. The Go To Row command was at the end of the script and the table was generated in the beginning with multiple table messages that run succesfully in between. Do you know if JMP finishes each line/message before moving to the next? If so, then I don't see why the wait command did anything. Or is it just a quirk in JSL?
No, JMP does not run your code synchronously. It begins each function as soon as possible, so you can have situations where the results from an earlier function are not available when a later function is called, which might depend on those results.
Wait( 0 ) causes JMP to 'catch up' before calling the next function after Wait().