<?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: script for auto column filling in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/script-for-auto-column-filling/m-p/314362#M56636</link>
    <description>&lt;P&gt;or you can use Contains keyword to check. I'm using same example code from JIM&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dt = New Table( "Fruit",
	New Column( "Fruit Name",
		character,
		values( {"Apple", "Banana", "Durain", "Pear", "Orange"} )
	)
);

soldList = {"Apple", "Durain"};

dt &amp;lt;&amp;lt; New Column( "Sold Out",
	character,
	formula( If( contains(soldList, :Fruit Name), "Y", "N" ) )
);
dt:Fruit Name &amp;lt;&amp;lt; delete formula;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 29 Sep 2020 06:24:44 GMT</pubDate>
    <dc:creator>ThuongLe</dc:creator>
    <dc:date>2020-09-29T06:24:44Z</dc:date>
    <item>
      <title>script for auto column filling</title>
      <link>https://community.jmp.com/t5/Discussions/script-for-auto-column-filling/m-p/312708#M56541</link>
      <description>&lt;P&gt;&lt;FONT size="4"&gt;one question about&amp;nbsp;script for column filling. now have one table for a lot kinds of fruit on sale, and a list includes fruit name that sold out already.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="4"&gt;how to new create one column (name "sold out?"), &lt;/FONT&gt;&lt;FONT size="4"&gt;and then judge&amp;nbsp;by checking whether the fruit name match with the "sold out fruit list" (apple/durain/…sold out already), if yes, fill in "Y", if no, fill in "N", thanks a lot.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Fruit Name&lt;/TD&gt;&lt;TD&gt;sold out?&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Apple&lt;/TD&gt;&lt;TD&gt;Y&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Banana&lt;/TD&gt;&lt;TD&gt;N&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;durain&lt;/TD&gt;&lt;TD&gt;Y&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;pear&lt;/TD&gt;&lt;TD&gt;N&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;orange&lt;/TD&gt;&lt;TD&gt;N&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;</description>
      <pubDate>Fri, 09 Jun 2023 23:38:57 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/script-for-auto-column-filling/m-p/312708#M56541</guid>
      <dc:creator>qspringleaf</dc:creator>
      <dc:date>2023-06-09T23:38:57Z</dc:date>
    </item>
    <item>
      <title>Re: script for auto column filling</title>
      <link>https://community.jmp.com/t5/Discussions/script-for-auto-column-filling/m-p/312895#M56549</link>
      <description>&lt;P&gt;Here is a solution using a JMP List as the input for the sold out fruit.&amp;nbsp; I also convert the new column to static values by deleting the formula at the end, since if you save the data table, and then reopen it, the column will fail if a JMP list by the name of soldList is not present&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dt = New Table( "Fruit",
	New Column( "Fruit Name",
		character,
		values( {"Apple", "Banana", "Durain", "Pear", "Orange"} )
	)
);

soldList = {"Apple", "Durain"};

dt &amp;lt;&amp;lt; New Column( "Sold Out",
	character,
	formula( If( N Rows( Loc( soldList, :Fruit Name ) ), "Y", "N" ) )
);
dt:Sold Out &amp;lt;&amp;lt; delete formula;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 29 Sep 2020 08:16:57 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/script-for-auto-column-filling/m-p/312895#M56549</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2020-09-29T08:16:57Z</dc:date>
    </item>
    <item>
      <title>Re: script for auto column filling</title>
      <link>https://community.jmp.com/t5/Discussions/script-for-auto-column-filling/m-p/314362#M56636</link>
      <description>&lt;P&gt;or you can use Contains keyword to check. I'm using same example code from JIM&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dt = New Table( "Fruit",
	New Column( "Fruit Name",
		character,
		values( {"Apple", "Banana", "Durain", "Pear", "Orange"} )
	)
);

soldList = {"Apple", "Durain"};

dt &amp;lt;&amp;lt; New Column( "Sold Out",
	character,
	formula( If( contains(soldList, :Fruit Name), "Y", "N" ) )
);
dt:Fruit Name &amp;lt;&amp;lt; delete formula;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 29 Sep 2020 06:24:44 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/script-for-auto-column-filling/m-p/314362#M56636</guid>
      <dc:creator>ThuongLe</dc:creator>
      <dc:date>2020-09-29T06:24:44Z</dc:date>
    </item>
  </channel>
</rss>

