<?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 How to Write Conditional Change Expressions？ in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/How-to-Write-Conditional-Change-Expressions/m-p/669061#M85716</link>
    <description>&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;//case1
x={"a01","b02","c003"};
dt &amp;lt;&amp;lt; select where(:name=="a01"|:name=="b02"|:name=="c003");

//case2
x={"a01","b02","c003","e03"};
dt &amp;lt;&amp;lt; select where(:name=="a01"|:name=="b02"|:name=="c003"|:name=="e03");

//case3
x={"a01"};
dt &amp;lt;&amp;lt; select where(:name=="a01")&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I have a question: as in the three cases of the code below, I now have a list x that changes, so the code for the selection condition also changes, how can I write a piece of code with an expression that takes care of all the x's that change.&lt;/P&gt;</description>
    <pubDate>Fri, 18 Aug 2023 04:32:22 GMT</pubDate>
    <dc:creator>lehaofeng</dc:creator>
    <dc:date>2023-08-18T04:32:22Z</dc:date>
    <item>
      <title>How to Write Conditional Change Expressions？</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-Write-Conditional-Change-Expressions/m-p/669061#M85716</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;//case1
x={"a01","b02","c003"};
dt &amp;lt;&amp;lt; select where(:name=="a01"|:name=="b02"|:name=="c003");

//case2
x={"a01","b02","c003","e03"};
dt &amp;lt;&amp;lt; select where(:name=="a01"|:name=="b02"|:name=="c003"|:name=="e03");

//case3
x={"a01"};
dt &amp;lt;&amp;lt; select where(:name=="a01")&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I have a question: as in the three cases of the code below, I now have a list x that changes, so the code for the selection condition also changes, how can I write a piece of code with an expression that takes care of all the x's that change.&lt;/P&gt;</description>
      <pubDate>Fri, 18 Aug 2023 04:32:22 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-Write-Conditional-Change-Expressions/m-p/669061#M85716</guid>
      <dc:creator>lehaofeng</dc:creator>
      <dc:date>2023-08-18T04:32:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to Write Conditional Change Expressions？</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-Write-Conditional-Change-Expressions/m-p/669064#M85717</link>
      <description>&lt;P&gt;You could use &lt;A href="https://www.jmp.com/support/help/en/16.2/#page/jmp/character-functions-2.shtml?os=win&amp;amp;source=application#ww2467451" target="_blank" rel="noopener"&gt;Contains()&lt;/A&gt; instead of Or()&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);

x = {"a01", "b02", "c003"};

dt &amp;lt;&amp;lt; select where(:name == "a01" | :name == "b02" | :name == "c003");
// to
dt &amp;lt;&amp;lt; select where(Contains(x, :name));
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 18 Aug 2023 04:57:27 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-Write-Conditional-Change-Expressions/m-p/669064#M85717</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2023-08-18T04:57:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to Write Conditional Change Expressions？</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-Write-Conditional-Change-Expressions/m-p/669069#M85718</link>
      <description>&lt;P&gt;Thank you, but the filter where in the tablebox only works like this.For example：&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; tablebox &amp;lt;&amp;lt; filter where(contains(x,colname), will report an error&lt;/P&gt;</description>
      <pubDate>Fri, 18 Aug 2023 05:06:24 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-Write-Conditional-Change-Expressions/m-p/669069#M85718</guid>
      <dc:creator>lehaofeng</dc:creator>
      <dc:date>2023-08-18T05:06:24Z</dc:date>
    </item>
    <item>
      <title>Re: How to Write Conditional Change Expressions？</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-Write-Conditional-Change-Expressions/m-p/669086#M85719</link>
      <description>&lt;P&gt;Few questions:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Where are you getting the x list?&lt;/LI&gt;
&lt;LI&gt;What are you trying to filter?&lt;/LI&gt;
&lt;LI&gt;What is triggering the action to filter?&lt;/LI&gt;
&lt;/UL&gt;</description>
      <pubDate>Fri, 18 Aug 2023 05:36:28 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-Write-Conditional-Change-Expressions/m-p/669086#M85719</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2023-08-18T05:36:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to Write Conditional Change Expressions？</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-Write-Conditional-Change-Expressions/m-p/669087#M85720</link>
      <description>&lt;P&gt;1. x from a listbox&lt;BR /&gt;2. the value of a column in the tablebox&lt;BR /&gt;3. through the listbox selected elements, automatically change the tablebox table content, because the table there is a row with a buttonbox, so still want to achieve through filterwhere&lt;/P&gt;</description>
      <pubDate>Fri, 18 Aug 2023 05:42:02 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-Write-Conditional-Change-Expressions/m-p/669087#M85720</guid>
      <dc:creator>lehaofeng</dc:creator>
      <dc:date>2023-08-18T05:42:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to Write Conditional Change Expressions？</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-Write-Conditional-Change-Expressions/m-p/669089#M85722</link>
      <description>&lt;P&gt;You might have to evaluate the variable&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);
New Window("Mountains",
	tb = Table Box(
		String Col Box("Mountain", {"K2", "Delphi", "Kilimanjaro", "Grand Teton"}),
		Number Col Box("Elevation (meters)", {8611, 681, 5895, 4199}),
		Plot Col Box("", {8611, 681, 5895, 4199})
	)
);
wait(1);
l = {"K2", "Delphi"};
Eval(EvalExpr(
	tb &amp;lt;&amp;lt; Filter Where(Contains(Expr(l), Mountain));	
));
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 18 Aug 2023 06:03:09 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-Write-Conditional-Change-Expressions/m-p/669089#M85722</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2023-08-18T06:03:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to Write Conditional Change Expressions？</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-Write-Conditional-Change-Expressions/m-p/669091#M85723</link>
      <description>&lt;P&gt;I can't believe that's the reason, learning, thanks.&lt;/P&gt;</description>
      <pubDate>Fri, 18 Aug 2023 06:19:16 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-Write-Conditional-Change-Expressions/m-p/669091#M85723</guid>
      <dc:creator>lehaofeng</dc:creator>
      <dc:date>2023-08-18T06:19:16Z</dc:date>
    </item>
  </channel>
</rss>

