<?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: How can I add all column values into Custom Filter in JMP Query Builder in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/How-can-I-add-all-column-values-into-Custom-Filter-in-JMP-Query/m-p/829901#M101225</link>
    <description>&lt;P&gt;This will get you all of the values from the data table&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;col_values=data table("WO")[0,0]&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Fri, 31 Jan 2025 05:19:10 GMT</pubDate>
    <dc:creator>txnelson</dc:creator>
    <dc:date>2025-01-31T05:19:10Z</dc:date>
    <item>
      <title>How can I add all column values into Custom Filter in JMP Query Builder</title>
      <link>https://community.jmp.com/t5/Discussions/How-can-I-add-all-column-values-into-Custom-Filter-in-JMP-Query/m-p/829838#M101218</link>
      <description>&lt;P&gt;Hello Sir or Madam,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I'm trying to do is extract one data table from the 1st database using SQL Query, then I want to put values from one column in the table into Custom Filters in the 2nd JMP Query Builder.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried to get values in Col Serial in WO data table extracted from the 1st database like below,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Col_Values = Data Table( "WO" ):Serial &amp;lt;&amp;lt; Get Values;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then, try to put the value into the Custom Filter for Col part_id in JMP Query Builder in the 2nd database.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Where( Custom( "part_id in (Col_Values)", UI( Custom( Base( "Continuous" ) ) ) ) )&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But, it didn't work.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would be really appreciated if there is any way that I can do this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;</description>
      <pubDate>Thu, 30 Jan 2025 22:20:09 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-can-I-add-all-column-values-into-Custom-Filter-in-JMP-Query/m-p/829838#M101218</guid>
      <dc:creator>hwchoi</dc:creator>
      <dc:date>2025-01-30T22:20:09Z</dc:date>
    </item>
    <item>
      <title>Re: How can I add all column values into Custom Filter in JMP Query Builder</title>
      <link>https://community.jmp.com/t5/Discussions/How-can-I-add-all-column-values-into-Custom-Filter-in-JMP-Query/m-p/829901#M101225</link>
      <description>&lt;P&gt;This will get you all of the values from the data table&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;col_values=data table("WO")[0,0]&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 31 Jan 2025 05:19:10 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-can-I-add-all-column-values-into-Custom-Filter-in-JMP-Query/m-p/829901#M101225</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2025-01-31T05:19:10Z</dc:date>
    </item>
    <item>
      <title>Re: How can I add all column values into Custom Filter in JMP Query Builder</title>
      <link>https://community.jmp.com/t5/Discussions/How-can-I-add-all-column-values-into-Custom-Filter-in-JMP-Query/m-p/829903#M101226</link>
      <description>&lt;P&gt;Not sure at which point you are having issues, but first get list of unique values from your column.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Use associative array (doesn't work with floats) and can be slow if you have lots of data (also re-orders your data)&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1); 

dt = open("$SAMPLE_DATA/Big Class.jmp");

uniq_age = Associative Array(Column(dt, "age")) &amp;lt;&amp;lt; get keys;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Use summarize, will change numbers to strings which is good thing in this case&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1); 

dt = open("$SAMPLE_DATA/Big Class.jmp");

Summarize(dt, uniq_age = By(:age)); &lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Or use Summary platform and data table subscripting / get values.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then turn that list into a string using concat items and build your query string. You might have to evaluate the value but I'm not sure if this is necessary&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1); 

dt = open("$SAMPLE_DATA/Big Class.jmp");

Summarize(dt, uniq_age = By(:age)); 
uniq_age_in = Concat Items(uniq_age, ", "); 
//uniq_age_in = "'" || Concat Items(uniq_age, "', '") || "'"; // note that if you have string, you need to add quotes

custom_sql_template = "part_id in (¤uniq_age_in¤)";
custom_sql = Eval Insert(custom_sql_template, "¤");


// your sql thing
Where(Custom(custom_sql, UI(Custom(Base("Continuous")))));


// or if evaluation is necessary
Eval(EvalExpr(
	Where(Custom(Expr(custom_sql), UI(Custom(Base("Continuous")))));	
));
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 31 Jan 2025 06:17:15 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-can-I-add-all-column-values-into-Custom-Filter-in-JMP-Query/m-p/829903#M101226</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2025-01-31T06:17:15Z</dc:date>
    </item>
    <item>
      <title>Re: How can I add all column values into Custom Filter in JMP Query Builder</title>
      <link>https://community.jmp.com/t5/Discussions/How-can-I-add-all-column-values-into-Custom-Filter-in-JMP-Query/m-p/830042#M101245</link>
      <description>&lt;P&gt;Hi jthi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you a lot for your answer. I need to slightly modify the script like below, but overall it works perfectly as I want. I really appreciate your help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;Data Table( "WorkOrder_Serial" ) &amp;lt;&amp;lt; New Column( "WO_SN",&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Character,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;"Nominal",&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Formula( "'" || :serial || "'")&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;);&lt;/DIV&gt;&lt;DIV&gt;//I made a new column with quotes as it works well.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Summarize( Data Table( "WorkOrder_Serial" ), SN = By( :WO_SN ) );&lt;/DIV&gt;&lt;DIV&gt;uniq_age_in = Concat Items( SN, "," );&amp;nbsp;&lt;/DIV&gt;</description>
      <pubDate>Fri, 31 Jan 2025 17:49:44 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-can-I-add-all-column-values-into-Custom-Filter-in-JMP-Query/m-p/830042#M101245</guid>
      <dc:creator>hwchoi</dc:creator>
      <dc:date>2025-01-31T17:49:44Z</dc:date>
    </item>
  </channel>
</rss>

