<?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: Get all the columns names and use Manage Spec Limits in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Get-all-the-columns-names-and-use-Manage-Spec-Limits/m-p/729569#M91208</link>
    <description>&lt;P&gt;Here is an example of adding an Eval() function to the list to get it to work&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dt_raw = Open( "$SAMPLE_DATA/Cities.jmp" );
colNames = dt_raw &amp;lt;&amp;lt; Get Column Names( string, continuous );
dt_spec = New Table( "Cities Limits",
	Add Rows( 4 ),
	New Column( "Process", Character, Set Values( {"OZONE", "CO", "SO2", "NO"} ) ),
	New Column( "LSL", Numeric, Set Values( [0, 0, 0, 0] ) ),
	New Column( "Target", Numeric, Set Values( [0.2, 15, 0.05, 0.035] ) ),
	New Column( "USL", Numeric, Set Values( [0.4, 30, 0.1, 0.07] ) ),
	Set Label Columns( :Process )
);

raw_item ={};
for each row(
	If(contains(colNames,:Process), insert into(raw_item,:Process)
));

obj = dt_raw &amp;lt;&amp;lt; Manage Limits(
	Process Variables( eval(raw_item) ),
	Load From Limits Table( dt_spec )
);
obj &amp;lt;&amp;lt; Save to Column Properties;
obj &amp;lt;&amp;lt; close window;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I also changed the calling structure for the Save to Column Properties.&amp;nbsp; My method seems to work better.&amp;nbsp; &amp;nbsp;But this might just be suppositious behavior.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 04 Mar 2024 00:14:59 GMT</pubDate>
    <dc:creator>txnelson</dc:creator>
    <dc:date>2024-03-04T00:14:59Z</dc:date>
    <item>
      <title>Get all the columns names and use Manage Spec Limits</title>
      <link>https://community.jmp.com/t5/Discussions/Get-all-the-columns-names-and-use-Manage-Spec-Limits/m-p/729557#M91207</link>
      <description>&lt;P&gt;Hi ,&lt;/P&gt;&lt;P&gt;I am using Manage Spec Limits to add the SPEC limit into my raw data.&lt;/P&gt;&lt;P&gt;I get all the columns names of raw data, and hope to list it in the Manage Spec Limits window. But it failed.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Pls help to give some ideas.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you.&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;dt_raw = Open( raw_file );
raw_item = dt_raw &amp;lt;&amp;lt; Get Column Names();
	
dt_spec = Open( spec_file );
	
obj = dt_raw &amp;lt;&amp;lt; Manage Spec Limits(
	Y( raw_item ),
	Load from Limits Table( dt_spec ),
	Show Limits All(0),
	Save to Column Properties( 1 )
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 03 Mar 2024 22:31:11 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Get-all-the-columns-names-and-use-Manage-Spec-Limits/m-p/729557#M91207</guid>
      <dc:creator>WHTseng</dc:creator>
      <dc:date>2024-03-03T22:31:11Z</dc:date>
    </item>
    <item>
      <title>Re: Get all the columns names and use Manage Spec Limits</title>
      <link>https://community.jmp.com/t5/Discussions/Get-all-the-columns-names-and-use-Manage-Spec-Limits/m-p/729569#M91208</link>
      <description>&lt;P&gt;Here is an example of adding an Eval() function to the list to get it to work&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dt_raw = Open( "$SAMPLE_DATA/Cities.jmp" );
colNames = dt_raw &amp;lt;&amp;lt; Get Column Names( string, continuous );
dt_spec = New Table( "Cities Limits",
	Add Rows( 4 ),
	New Column( "Process", Character, Set Values( {"OZONE", "CO", "SO2", "NO"} ) ),
	New Column( "LSL", Numeric, Set Values( [0, 0, 0, 0] ) ),
	New Column( "Target", Numeric, Set Values( [0.2, 15, 0.05, 0.035] ) ),
	New Column( "USL", Numeric, Set Values( [0.4, 30, 0.1, 0.07] ) ),
	Set Label Columns( :Process )
);

raw_item ={};
for each row(
	If(contains(colNames,:Process), insert into(raw_item,:Process)
));

obj = dt_raw &amp;lt;&amp;lt; Manage Limits(
	Process Variables( eval(raw_item) ),
	Load From Limits Table( dt_spec )
);
obj &amp;lt;&amp;lt; Save to Column Properties;
obj &amp;lt;&amp;lt; close window;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I also changed the calling structure for the Save to Column Properties.&amp;nbsp; My method seems to work better.&amp;nbsp; &amp;nbsp;But this might just be suppositious behavior.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 04 Mar 2024 00:14:59 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Get-all-the-columns-names-and-use-Manage-Spec-Limits/m-p/729569#M91208</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2024-03-04T00:14:59Z</dc:date>
    </item>
  </channel>
</rss>

