<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic A JSL scripting question:  JMP alert  Please select the rows to be deleted in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/A-JSL-scripting-question-JMP-alert-Please-select-the-rows-to-be/m-p/5719#M5718</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Has anyone seen this pop up box come up while trying to delete rows?&amp;nbsp; I pasted the code that I'm using below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;On several of my scripts, I've seen this pop up box show up - there's no option except "Ok", and once you click it, the script continues as normal.&amp;nbsp; It's part of an iterative loop, and strangely it doesn't happen on every iteration.&lt;/P&gt;&lt;P&gt;At first I thought it happened because the row selection in the code was null, but when I replaced the "checkweek&amp;lt;&amp;lt;delete rows" line with&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if (nrows(checkweek&amp;lt;&amp;lt;get selected rows)&amp;gt;0, checkweek&amp;lt;&amp;lt;delete rows(),wait(0));&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I started getting errors from JMP saying it couldn't resolve the next line.&lt;/P&gt;&lt;P&gt;FBListWeek=:Cause&amp;lt;&amp;lt;get values;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've even added a checkweek&amp;lt;&amp;lt;data table window to try and make sure JMP knows this is the table I want to work with.&amp;nbsp; The odd thing is, when I click on checkweek to make it active, and then copy just the single line of code (FBListweek=:Cause&amp;lt;&amp;lt;get values;) into a separate script window, it has no problems (not to mention the fact that when I didn't have the if statement, it worked fine minus having to click ok).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm running JMP 9 on a windows 7 Enterprise machine that has 32GB of RAM, and there's nothing remarkable with the table except for the fact that it's very large (over 1 million rows).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance,&lt;/P&gt;&lt;P&gt;Eugene.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Code:&lt;/P&gt;&lt;P&gt;for(i=1,i&amp;lt;=nvector,i++,&lt;/P&gt;&lt;P&gt;current data table(week);&lt;/P&gt;&lt;P&gt;paretoweek = Pareto Plot( Cause( :FB ), Per Unit Rates( 1 ), Where( :PKG == eval(pkgnames&lt;I&gt;) &amp;amp; :Sort_Config == eval(sortconfignames&lt;I&gt;) ) );&lt;/I&gt;&lt;/I&gt;&lt;/P&gt;&lt;P&gt;rparetoweek=paretoweek&amp;lt;&amp;lt;report;&lt;/P&gt;&lt;P&gt;rparetoweek[tablebox(1)]&amp;lt;&amp;lt;make data table("checkweek");&lt;/P&gt;&lt;P&gt;checkweek=data table("checkweek");&lt;/P&gt;&lt;P&gt;checkweek&amp;lt;&amp;lt;Select where(rate&amp;lt;0.001);&lt;/P&gt;&lt;P&gt;checkweek&amp;lt;&amp;lt;delete rows;&lt;/P&gt;&lt;P&gt;checkweek&amp;lt;&amp;lt;select where(cause=="Pooled Total");&lt;/P&gt;&lt;P&gt;checkweek&amp;lt;&amp;lt;delete rows;&lt;/P&gt;&lt;P&gt;FBListWeek=:Cause&amp;lt;&amp;lt;get values;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 03 Oct 2012 22:49:17 GMT</pubDate>
    <dc:creator>euge</dc:creator>
    <dc:date>2012-10-03T22:49:17Z</dc:date>
    <item>
      <title>A JSL scripting question:  JMP alert  Please select the rows to be deleted</title>
      <link>https://community.jmp.com/t5/Discussions/A-JSL-scripting-question-JMP-alert-Please-select-the-rows-to-be/m-p/5719#M5718</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Has anyone seen this pop up box come up while trying to delete rows?&amp;nbsp; I pasted the code that I'm using below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;On several of my scripts, I've seen this pop up box show up - there's no option except "Ok", and once you click it, the script continues as normal.&amp;nbsp; It's part of an iterative loop, and strangely it doesn't happen on every iteration.&lt;/P&gt;&lt;P&gt;At first I thought it happened because the row selection in the code was null, but when I replaced the "checkweek&amp;lt;&amp;lt;delete rows" line with&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if (nrows(checkweek&amp;lt;&amp;lt;get selected rows)&amp;gt;0, checkweek&amp;lt;&amp;lt;delete rows(),wait(0));&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I started getting errors from JMP saying it couldn't resolve the next line.&lt;/P&gt;&lt;P&gt;FBListWeek=:Cause&amp;lt;&amp;lt;get values;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've even added a checkweek&amp;lt;&amp;lt;data table window to try and make sure JMP knows this is the table I want to work with.&amp;nbsp; The odd thing is, when I click on checkweek to make it active, and then copy just the single line of code (FBListweek=:Cause&amp;lt;&amp;lt;get values;) into a separate script window, it has no problems (not to mention the fact that when I didn't have the if statement, it worked fine minus having to click ok).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm running JMP 9 on a windows 7 Enterprise machine that has 32GB of RAM, and there's nothing remarkable with the table except for the fact that it's very large (over 1 million rows).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance,&lt;/P&gt;&lt;P&gt;Eugene.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Code:&lt;/P&gt;&lt;P&gt;for(i=1,i&amp;lt;=nvector,i++,&lt;/P&gt;&lt;P&gt;current data table(week);&lt;/P&gt;&lt;P&gt;paretoweek = Pareto Plot( Cause( :FB ), Per Unit Rates( 1 ), Where( :PKG == eval(pkgnames&lt;I&gt;) &amp;amp; :Sort_Config == eval(sortconfignames&lt;I&gt;) ) );&lt;/I&gt;&lt;/I&gt;&lt;/P&gt;&lt;P&gt;rparetoweek=paretoweek&amp;lt;&amp;lt;report;&lt;/P&gt;&lt;P&gt;rparetoweek[tablebox(1)]&amp;lt;&amp;lt;make data table("checkweek");&lt;/P&gt;&lt;P&gt;checkweek=data table("checkweek");&lt;/P&gt;&lt;P&gt;checkweek&amp;lt;&amp;lt;Select where(rate&amp;lt;0.001);&lt;/P&gt;&lt;P&gt;checkweek&amp;lt;&amp;lt;delete rows;&lt;/P&gt;&lt;P&gt;checkweek&amp;lt;&amp;lt;select where(cause=="Pooled Total");&lt;/P&gt;&lt;P&gt;checkweek&amp;lt;&amp;lt;delete rows;&lt;/P&gt;&lt;P&gt;FBListWeek=:Cause&amp;lt;&amp;lt;get values;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Oct 2012 22:49:17 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/A-JSL-scripting-question-JMP-alert-Please-select-the-rows-to-be/m-p/5719#M5718</guid>
      <dc:creator>euge</dc:creator>
      <dc:date>2012-10-03T22:49:17Z</dc:date>
    </item>
    <item>
      <title>Re: A JSL scripting question:  JMP alert  Please select the rows to be deleted</title>
      <link>https://community.jmp.com/t5/Discussions/A-JSL-scripting-question-JMP-alert-Please-select-the-rows-to-be/m-p/5720#M5719</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Euge,&lt;/P&gt;&lt;P&gt;I have found that in JMP 9 and greater, a more robust way to delete rows is to use the 'delete rows' with an embedded 'get rows where'.&lt;/P&gt;&lt;P&gt;This avoids trying to pass a reference to a table with a change in the selected row state into a susequent command, which may or may not be the root of the issue.&lt;/P&gt;&lt;P&gt;For example:&lt;/P&gt;&lt;P&gt;dt=currentdatatable();&lt;/P&gt;&lt;P&gt;dt&amp;lt;&amp;lt;delete rows(dt&amp;lt;&amp;lt;getrowswhere(:my_column=="Some Value"));&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am no sure if it is the issue in your example, but consider trying.&lt;/P&gt;&lt;P&gt;for(i=1,i&amp;lt;=nvector,i++,&lt;/P&gt;&lt;P&gt;current data table(week);&lt;/P&gt;&lt;P&gt;paretoweek = Pareto Plot( Cause( :FB ), Per Unit Rates( 1 ), Where( :PKG == eval(pkgnames&lt;I&gt;) &amp;amp; :Sort_Config == eval(sortconfignames&lt;I&gt;) ) );&lt;/I&gt;&lt;/I&gt;&lt;/P&gt;&lt;P&gt;rparetoweek=paretoweek&amp;lt;&amp;lt;report;&lt;/P&gt;&lt;P&gt;rparetoweek[tablebox(1)]&amp;lt;&amp;lt;make data table("checkweek");&lt;/P&gt;&lt;P&gt;//consider here also adding a wait(0), so the table is created before there is an attempt to delete rows from it&lt;/P&gt;&lt;P&gt;wait(0);&lt;/P&gt;&lt;P&gt;checkweek=data table("checkweek");&lt;/P&gt;&lt;P&gt;checkweek&amp;lt;&amp;lt;deleterows(checkweek&amp;lt;&amp;lt;get rows where(:rate&amp;lt;0.001));&lt;/P&gt;&lt;P&gt;checkweek&amp;lt;&amp;lt;detelerows(checkweek&amp;lt;&amp;lt;get rows where(:cause=="Pooled Total");&lt;/P&gt;&lt;P&gt;FBListWeek=:Cause&amp;lt;&amp;lt;get values;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Peter&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 06 Oct 2012 18:06:27 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/A-JSL-scripting-question-JMP-alert-Please-select-the-rows-to-be/m-p/5720#M5719</guid>
      <dc:creator>wiebepo</dc:creator>
      <dc:date>2012-10-06T18:06:27Z</dc:date>
    </item>
    <item>
      <title>Re: A JSL scripting question:  JMP alert  Please select the rows to be deleted</title>
      <link>https://community.jmp.com/t5/Discussions/A-JSL-scripting-question-JMP-alert-Please-select-the-rows-to-be/m-p/5721#M5720</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I sent an email to the help desk, and it turns out that this is the solution:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It sounds like the popup message may be generated because there are no rows selected.&amp;nbsp; If you were running the script from a JSL file, the message would be sent to the log and the script would continue.&amp;nbsp; However if the script was being called from a button, then JMP is no longer in batch mode and will issue messages interactively.&amp;nbsp; This can be handled either of the following two ways:&lt;/P&gt;&lt;P&gt;a.&amp;nbsp; Add the Batch Interactive function to the button script to set the runtime environment to batch at the beginning of the button &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; script and turns it off at the end of the button script:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Batch Interactive( 1 );&amp;nbsp; //Batch mode&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;JSL commands&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Batch Interactive( 0 );&amp;nbsp; //Reverts to previous mode&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;b (it turns out this option didn't work for me, which is to put the conditional null row selection check).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Oct 2012 00:01:04 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/A-JSL-scripting-question-JMP-alert-Please-select-the-rows-to-be/m-p/5721#M5720</guid>
      <dc:creator>euge</dc:creator>
      <dc:date>2012-10-16T00:01:04Z</dc:date>
    </item>
  </channel>
</rss>

