<?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: Comparing strings not working for variables in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Comparing-strings-not-working-for-variables/m-p/380044#M63013</link>
    <description>&lt;P&gt;Ok I solved it. This is what was missing:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;(:Stat == (myStat)) &lt;/PRE&gt;&lt;P&gt;So, the variable needs to be inside two parentheses!&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 27 Apr 2021 13:05:34 GMT</pubDate>
    <dc:creator>student</dc:creator>
    <dc:date>2021-04-27T13:05:34Z</dc:date>
    <item>
      <title>Comparing strings not working for variables</title>
      <link>https://community.jmp.com/t5/Discussions/Comparing-strings-not-working-for-variables/m-p/379983#M63005</link>
      <description>&lt;P&gt;Hi, I am using JMP 15 on Mac. The following code works:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;dt = current data table();
Current Data Table() &amp;lt;&amp;lt; Row Selection(
Select where( (:Stat == "Max"), Current Selection( Extend ))
);&lt;/PRE&gt;&lt;P&gt;But this doesn't:&lt;/P&gt;&lt;PRE&gt;dt = current data table();
Current Data Table() &amp;lt;&amp;lt; Row Selection(
var = "Max"
Select where( (:Stat == var), Current Selection( Extend ))
);&lt;/PRE&gt;&lt;P&gt;Can someone explains what is wrong with the second one?&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jun 2023 19:45:22 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Comparing-strings-not-working-for-variables/m-p/379983#M63005</guid>
      <dc:creator>student</dc:creator>
      <dc:date>2023-06-09T19:45:22Z</dc:date>
    </item>
    <item>
      <title>Re: Comparing strings not working for variables</title>
      <link>https://community.jmp.com/t5/Discussions/Comparing-strings-not-working-for-variables/m-p/379990#M63006</link>
      <description>&lt;P&gt;Try moving var = "Max" outside the &amp;lt;&amp;lt; Row Selection(). And add missing ;&lt;/P&gt;</description>
      <pubDate>Tue, 27 Apr 2021 08:07:22 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Comparing-strings-not-working-for-variables/m-p/379990#M63006</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2021-04-27T08:07:22Z</dc:date>
    </item>
    <item>
      <title>Re: Comparing strings not working for variables</title>
      <link>https://community.jmp.com/t5/Discussions/Comparing-strings-not-working-for-variables/m-p/380039#M63012</link>
      <description>&lt;P&gt;No change (thanks for your reply though).&lt;/P&gt;</description>
      <pubDate>Tue, 27 Apr 2021 12:58:30 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Comparing-strings-not-working-for-variables/m-p/380039#M63012</guid>
      <dc:creator>student</dc:creator>
      <dc:date>2021-04-27T12:58:30Z</dc:date>
    </item>
    <item>
      <title>Re: Comparing strings not working for variables</title>
      <link>https://community.jmp.com/t5/Discussions/Comparing-strings-not-working-for-variables/m-p/380044#M63013</link>
      <description>&lt;P&gt;Ok I solved it. This is what was missing:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;(:Stat == (myStat)) &lt;/PRE&gt;&lt;P&gt;So, the variable needs to be inside two parentheses!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 27 Apr 2021 13:05:34 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Comparing-strings-not-working-for-variables/m-p/380044#M63013</guid>
      <dc:creator>student</dc:creator>
      <dc:date>2021-04-27T13:05:34Z</dc:date>
    </item>
    <item>
      <title>Re: Comparing strings not working for variables</title>
      <link>https://community.jmp.com/t5/Discussions/Comparing-strings-not-working-for-variables/m-p/380332#M63068</link>
      <description>&lt;P&gt;Seems like there is something a bit weird going on (tested with JMP16.0 on Windows 10). Take careful look on the brackets when using Row Selection&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Example from scripting index (works fine):&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 &amp;lt;&amp;lt; Row Selection(Select where(:age &amp;lt; 15));
Wait(2);
dt &amp;lt;&amp;lt; Row Selection(
	Select where(:age == 15),
	current selection("extend")
);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Adding variable before second row selection and using it (returns Scriptable[]):&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;Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Big Class.jmp");
dt &amp;lt;&amp;lt; Row Selection(Select where(:age &amp;lt; 15));
Wait(2);
ageVar = 15;
dt &amp;lt;&amp;lt; Row Selection(
	Select where(:age == ageVar),
	current selection("extend")
);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Moving the bracket from end of Select Where to after current selection (seems to work fine, but this syntax seems wrong for Row Selection based on Scripting Index):&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 &amp;lt;&amp;lt; Row Selection(Select where(:age &amp;lt; 15));
Wait(2);
ageVar = 15;
dt &amp;lt;&amp;lt; Row Selection(
	Select where(:age == ageVar,
	current selection("extend"))
);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jthi_0-1619588178969.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/32381i137F5A2C777BCC72/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jthi_0-1619588178969.png" alt="jthi_0-1619588178969.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When using Select Where platform the script generated seems to be:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Data Table("Big Class") &amp;lt;&amp;lt; Row Selection(
	Select where(:age == 15, Current Selection("Extend")),
	Dialog(Edit(Equal(Source Column(:age))), Keep dialog open(1))
);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Selection when not using Row Selection:&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 &amp;lt;&amp;lt; Row Selection(Select where(:age &amp;lt; 15));
Wait(2);
ageVar = 15;
dt &amp;lt;&amp;lt; Select where(:age == ageVar, current selection("extend"));&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If there is no need for dialog, I would most likely always just use &amp;lt;&amp;lt; Select Where (without Row Selection) as the syntax is easier and I'm not sure if Row Selection brings anything extra to the table besides the dialog.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Not sure who to tag here from JMP/SAS to take a look into this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 28 Apr 2021 05:54:25 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Comparing-strings-not-working-for-variables/m-p/380332#M63068</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2021-04-28T05:54:25Z</dc:date>
    </item>
  </channel>
</rss>

