<?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 Re: How to replace empty rows in select columns? in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/How-to-replace-empty-rows-in-select-columns/m-p/516021#M74268</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Another non-scripting solution is to select your three columns, right-click on the headers &amp;gt; Standardize Attributes &amp;gt; Recode &amp;gt; replace the blanks with "REF."&lt;/P&gt;
&lt;P&gt;CAUTION: Recoding cannot be undone, so make sure to save your table before going through the steps above.&lt;/P&gt;
&lt;P&gt;Best,&lt;/P&gt;
&lt;P&gt;TS&lt;/P&gt;</description>
    <pubDate>Thu, 30 Jun 2022 04:50:04 GMT</pubDate>
    <dc:creator>Thierry_S</dc:creator>
    <dc:date>2022-06-30T04:50:04Z</dc:date>
    <item>
      <title>How to replace empty rows in select columns?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-replace-empty-rows-in-select-columns/m-p/515981#M74264</link>
      <description>&lt;P&gt;Hello JMP Community,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a data table that columns have specific name, first i wrote the script to select those columns, and i want to replace those column's empty rows with "REF", but other columns without those specific name won't change, how can i do this with JSL? Thanks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SING_2-1656558042688.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/43695i37567251CA9C2CE1/image-size/medium?v=v2&amp;amp;px=400" role="button" title="SING_2-1656558042688.png" alt="SING_2-1656558042688.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 10 Jun 2023 23:50:35 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-replace-empty-rows-in-select-columns/m-p/515981#M74264</guid>
      <dc:creator>SING</dc:creator>
      <dc:date>2023-06-10T23:50:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to replace empty rows in select columns?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-replace-empty-rows-in-select-columns/m-p/516016#M74267</link>
      <description>&lt;P&gt;Here is a little script that loops through all of the character columns and then in each column, finds all of the rows that have empty cells, and sets them to REF&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dt = Current Data Table();

// Get the column names for all character columns
colNameList = dt &amp;lt;&amp;lt; get column names( string, character );

For( i = 1, i &amp;lt;= N Items( colNameList ), i++,
	Try(
		As Column( dt, colNameList[i] )[dt &amp;lt;&amp;lt; get rows where( As Column( dt, colNameList[i] ) == "" )] =
		"REF"
	)
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 30 Jun 2022 04:42:32 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-replace-empty-rows-in-select-columns/m-p/516016#M74267</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2022-06-30T04:42:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to replace empty rows in select columns?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-replace-empty-rows-in-select-columns/m-p/516021#M74268</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Another non-scripting solution is to select your three columns, right-click on the headers &amp;gt; Standardize Attributes &amp;gt; Recode &amp;gt; replace the blanks with "REF."&lt;/P&gt;
&lt;P&gt;CAUTION: Recoding cannot be undone, so make sure to save your table before going through the steps above.&lt;/P&gt;
&lt;P&gt;Best,&lt;/P&gt;
&lt;P&gt;TS&lt;/P&gt;</description>
      <pubDate>Thu, 30 Jun 2022 04:50:04 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-replace-empty-rows-in-select-columns/m-p/516021#M74268</guid>
      <dc:creator>Thierry_S</dc:creator>
      <dc:date>2022-06-30T04:50:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to replace empty rows in select columns?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-replace-empty-rows-in-select-columns/m-p/516076#M74271</link>
      <description>&lt;P&gt;Hi txnelson,&lt;/P&gt;&lt;P&gt;I tried the script you gave, but this will also replace value column, so can i only replace column with lot data?&lt;/P&gt;&lt;P&gt;I wrote this script but don't understand what's part be wrong.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt = Current Data Table();
colNameList = dt &amp;lt;&amp;lt; get column names( string, character );

For( i = 1, i &amp;lt;= N Items( colNameList ), i++,
	Try(
		If(Contains(Col_List[i], "::LotData")),
		As Column( dt, colNameList[i] )[dt &amp;lt;&amp;lt; get rows where( As Column( dt, colNameList[i] ) == "" )] =
		"REF"
	)
);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 30 Jun 2022 06:59:30 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-replace-empty-rows-in-select-columns/m-p/516076#M74271</guid>
      <dc:creator>SING</dc:creator>
      <dc:date>2022-06-30T06:59:30Z</dc:date>
    </item>
    <item>
      <title>Re: How to replace empty rows in select columns?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-replace-empty-rows-in-select-columns/m-p/517104#M74352</link>
      <description>&lt;P&gt;Hi Sing,&lt;/P&gt;
&lt;P&gt;I think there are two issues in your Script,&lt;/P&gt;
&lt;P&gt;1st: your if referenced the wrong list (Col_List)&lt;/P&gt;
&lt;P&gt;2nd: the action is not inside your if statement, but after, so the if cannot control the action.&lt;/P&gt;
&lt;P&gt;Try the attached script, it should do the job. In addition to Jim's script I added the modifications you may need.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );

dt = New Table( "test",
	New Column( "A::LotData", "Character", set values( {"", "YES", ""} ) ),
	New Column( "B::LotData", "Character", set values( {"", "YES", ""} ) ),
	New Column( "C::LotData", "Character", set values( {"", "YES", ""} ) ),
	New Column( "D::Test", "Character", set values( {"", "Test", ""} ) ),
	New Column( "value", set values( {1, 2, 3} ) )
);

colNameList = dt &amp;lt;&amp;lt; get column names( string, character );

For( i = 1, i &amp;lt;= N Items( colNameList ), i++,
	Try(
		If( Contains( colNameList[i], "::LotData" ),
			As Column( dt, colNameList[i] )[dt &amp;lt;&amp;lt; get rows where( As Column( dt, colNameList[i] ) == "" )] = "REF"
		), 

	)
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 02 Jul 2022 20:57:37 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-replace-empty-rows-in-select-columns/m-p/517104#M74352</guid>
      <dc:creator>Georg</dc:creator>
      <dc:date>2022-07-02T20:57:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to replace empty rows in select columns?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-replace-empty-rows-in-select-columns/m-p/517323#M74361</link>
      <description>Thanks a lot!</description>
      <pubDate>Mon, 04 Jul 2022 01:49:30 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-replace-empty-rows-in-select-columns/m-p/517323#M74361</guid>
      <dc:creator>SING</dc:creator>
      <dc:date>2022-07-04T01:49:30Z</dc:date>
    </item>
  </channel>
</rss>

