<?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: Data table - If one column has empty value, then use other column value to fill in,other row keep no change in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Data-table-If-one-column-has-empty-value-then-use-other-column/m-p/375411#M62529</link>
    <description>&lt;P&gt;One way to script it would be using &amp;lt;&amp;lt; set each value with if to check for empty string (if numeric you have to change the if to use IsMissing()).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;names default to here(1);

dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
dt:sex[3::4] = "";

dt:sex &amp;lt;&amp;lt; Set Each Value(If(:sex == "", :name, :sex));&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 09 Apr 2021 09:33:27 GMT</pubDate>
    <dc:creator>jthi</dc:creator>
    <dc:date>2021-04-09T09:33:27Z</dc:date>
    <item>
      <title>Data table - If one column has empty value, then use other column value to fill in,other row keep no change</title>
      <link>https://community.jmp.com/t5/Discussions/Data-table-If-one-column-has-empty-value-then-use-other-column/m-p/375382#M62524</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );

//If the original data table is like below, 
// there are 2 empty value(:sex[3] and :sex[4] )in column sex:
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
dt:sex[3 4] = black;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I want the function is:&lt;/P&gt;
&lt;P&gt;when search all values in column :sex, if find column sex have empty value, then fill the column :name value into the empty position in :sex&amp;nbsp;while keep other value in :sex with no change.&lt;/P&gt;</description>
      <pubDate>Sat, 10 Jun 2023 23:28:25 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Data-table-If-one-column-has-empty-value-then-use-other-column/m-p/375382#M62524</guid>
      <dc:creator>Theresa</dc:creator>
      <dc:date>2023-06-10T23:28:25Z</dc:date>
    </item>
    <item>
      <title>Re: Data table - If one column has empty value, then use other column value to fill in,other row keep no change</title>
      <link>https://community.jmp.com/t5/Discussions/Data-table-If-one-column-has-empty-value-then-use-other-column/m-p/375411#M62529</link>
      <description>&lt;P&gt;One way to script it would be using &amp;lt;&amp;lt; set each value with if to check for empty string (if numeric you have to change the if to use IsMissing()).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;names default to here(1);

dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
dt:sex[3::4] = "";

dt:sex &amp;lt;&amp;lt; Set Each Value(If(:sex == "", :name, :sex));&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Apr 2021 09:33:27 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Data-table-If-one-column-has-empty-value-then-use-other-column/m-p/375411#M62529</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2021-04-09T09:33:27Z</dc:date>
    </item>
  </channel>
</rss>

