<?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: jsl script individually working fine, but add-in implementation is not working in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/jsl-script-individually-working-fine-but-add-in-implementation/m-p/410302#M66005</link>
    <description>&lt;P&gt;It's best to be explicit with your table names, such as&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;For Each Row( dt,
    If( :age == 12,&lt;BR /&gt;        :age = .&lt;BR /&gt;    )
)&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;The function "for each row" can take the table to loop over as the first argument.&lt;/P&gt;</description>
    <pubDate>Mon, 16 Aug 2021 20:30:48 GMT</pubDate>
    <dc:creator>ErraticAttack</dc:creator>
    <dc:date>2021-08-16T20:30:48Z</dc:date>
    <item>
      <title>jsl script individually working fine, but add-in implementation is not working</title>
      <link>https://community.jmp.com/t5/Discussions/jsl-script-individually-working-fine-but-add-in-implementation/m-p/409863#M65962</link>
      <description>&lt;P&gt;I have a data table where I want to replace certain values with "."&lt;BR /&gt;Below is the script example&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt = Current Data Table();

for each row (
	if (:age == 12, age= . );
);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;but same is not working when I have this code as add-in, data table looks like this&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;vinay	35
atul	55
prerna	12
adi	21&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Sibh&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jun 2023 19:54:42 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/jsl-script-individually-working-fine-but-add-in-implementation/m-p/409863#M65962</guid>
      <dc:creator>SIBH</dc:creator>
      <dc:date>2023-06-09T19:54:42Z</dc:date>
    </item>
    <item>
      <title>Re: jsl script individually working fine, but add-in implementation is not working</title>
      <link>https://community.jmp.com/t5/Discussions/jsl-script-individually-working-fine-but-add-in-implementation/m-p/409997#M65980</link>
      <description>&lt;P&gt;Edit: See&amp;nbsp;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/26363"&gt;@ErraticAttack&lt;/a&gt;'s answer below, that is better.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/15709"&gt;@SIBH&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is it possible your current data table is not the one you want to manipulate.&amp;nbsp; In your script you are setting dt equal to the current data table, but you are not setting the data table equal to dt.&amp;nbsp; &amp;nbsp;If dt is already defined somewhere, for example if you already used dt = Open( ... ), then you could set the current data table like this:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Current data table( dt );&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Or, if dt references the right data table, you could scope your columns to be in that specific table, like this:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;for each row (
	if (dt:age == 12, dt:age= . );
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 17 Aug 2021 02:19:26 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/jsl-script-individually-working-fine-but-add-in-implementation/m-p/409997#M65980</guid>
      <dc:creator>ih</dc:creator>
      <dc:date>2021-08-17T02:19:26Z</dc:date>
    </item>
    <item>
      <title>Re: jsl script individually working fine, but add-in implementation is not working</title>
      <link>https://community.jmp.com/t5/Discussions/jsl-script-individually-working-fine-but-add-in-implementation/m-p/410302#M66005</link>
      <description>&lt;P&gt;It's best to be explicit with your table names, such as&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;For Each Row( dt,
    If( :age == 12,&lt;BR /&gt;        :age = .&lt;BR /&gt;    )
)&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;The function "for each row" can take the table to loop over as the first argument.&lt;/P&gt;</description>
      <pubDate>Mon, 16 Aug 2021 20:30:48 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/jsl-script-individually-working-fine-but-add-in-implementation/m-p/410302#M66005</guid>
      <dc:creator>ErraticAttack</dc:creator>
      <dc:date>2021-08-16T20:30:48Z</dc:date>
    </item>
  </channel>
</rss>

