<?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 Show a pop up with a statement in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Show-a-pop-up-with-a-statement/m-p/77818#M36274</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am new to JSL scripting and was wondering how can I get JMP to pop up a window to display how many cols were deleted.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My code to delete cols is shown below:&lt;/P&gt;&lt;P&gt;dt = Current Data Table();&lt;/P&gt;&lt;P&gt;For( i = N Col( dt ), i &amp;gt;= 1, i--,&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;If( (Col N Missing( Column( i ) ) / N Row()) == 1,&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dt &amp;lt;&amp;lt; delete columns( i )&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;P&gt;);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 03 Oct 2018 23:30:13 GMT</pubDate>
    <dc:creator>rshehadah</dc:creator>
    <dc:date>2018-10-03T23:30:13Z</dc:date>
    <item>
      <title>Show a pop up with a statement</title>
      <link>https://community.jmp.com/t5/Discussions/Show-a-pop-up-with-a-statement/m-p/77818#M36274</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am new to JSL scripting and was wondering how can I get JMP to pop up a window to display how many cols were deleted.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My code to delete cols is shown below:&lt;/P&gt;&lt;P&gt;dt = Current Data Table();&lt;/P&gt;&lt;P&gt;For( i = N Col( dt ), i &amp;gt;= 1, i--,&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;If( (Col N Missing( Column( i ) ) / N Row()) == 1,&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dt &amp;lt;&amp;lt; delete columns( i )&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;P&gt;);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Oct 2018 23:30:13 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Show-a-pop-up-with-a-statement/m-p/77818#M36274</guid>
      <dc:creator>rshehadah</dc:creator>
      <dc:date>2018-10-03T23:30:13Z</dc:date>
    </item>
    <item>
      <title>Re: Show a pop up with a statement</title>
      <link>https://community.jmp.com/t5/Discussions/Show-a-pop-up-with-a-statement/m-p/77819#M36275</link>
      <description>&lt;P&gt;Here is one way&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dt = Current Data Table();
count = 0;
For( i = N Col( dt ), i &amp;gt;= 1, i--,
	If( (Col N Missing( Column( i ) ) / N Row()) == 1,
		dt &amp;lt;&amp;lt; delete columns( i );
		count++;
	)
);

New Window( "Message", modal,
	H List Box(
		Spacer Box( size( 5, 0 ) ),
		Text Box( Char( count ) ),
		Text Box( " Columns Were Deleted" )
	)
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 03 Oct 2018 23:52:40 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Show-a-pop-up-with-a-statement/m-p/77819#M36275</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2018-10-03T23:52:40Z</dc:date>
    </item>
    <item>
      <title>Re: Show a pop up with a statement</title>
      <link>https://community.jmp.com/t5/Discussions/Show-a-pop-up-with-a-statement/m-p/77887#M36291</link>
      <description>&lt;P&gt;Adding to Jim's approach, this code uses the &lt;STRONG&gt;caption&lt;/STRONG&gt; command to show what columns are being deleted.&amp;nbsp; If the table is small&amp;nbsp;the caption messages will flash by very quickly, but for larger tables it will give users an idea of progress.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dt = Current Data Table();
count = 0;
nr = nrows(dt);
nc = ncols(dt);
For ( i = nc, i &amp;gt;= 1, i--,
	If ( Col N Missing( Column( i ) ) == nr,
		col_name = column(i) &amp;lt;&amp;lt; get name;
		caption("Deleting column " || col_name);
		wait(0);
		dt &amp;lt;&amp;lt; delete columns( i );
		count++;
	);
);
// Remove the caption box
caption(remove);
wait(0);
New Window( "Message", &amp;lt;&amp;lt;modal,
	Text Box( Char( count ) || " Columns were deleted" )
);
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 04 Oct 2018 13:35:48 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Show-a-pop-up-with-a-statement/m-p/77887#M36291</guid>
      <dc:creator>pmroz</dc:creator>
      <dc:date>2018-10-04T13:35:48Z</dc:date>
    </item>
  </channel>
</rss>

