<?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: Assigning Minimum value to a column in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Assigning-Minimum-value-to-a-column/m-p/255110#M50081</link>
    <description>&lt;P&gt;What kept you from being able to take the example from "&lt;A id="link_29" class="page-link lia-link-navigation lia-custom-event" style="background-attachment: scroll; background-clip: border-box; background-color: transparent; background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: repeat; background-size: auto; box-sizing: border-box; color: #737373; font-family: Arial,Helvetica,sans-serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 1.3333; margin-right: 3px; orphans: 2; outline-color: invert; outline-offset: -2px; outline-style: none; outline-width: 0px; overflow-wrap: break-word; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; transition-delay: 0s; transition-duration: 0.3s; transition-property: all; transition-timing-function: ease; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;" href="https://community.jmp.com/t5/Discussions/Adding-new-columns-to-a-data-table/td-p/56078/jump-to/first-unread-message" target="_blank"&gt;Adding new columns to a data table &lt;/A&gt;" and add it to your script?&lt;/P&gt;
&lt;P&gt;Did you know that you can go to the Scripting Guide, and get examples of how to do things?&amp;nbsp; If not, I very strongly recommend that you familiarize yourself with it.&lt;/P&gt;
&lt;P&gt;Here is the sample script I gave you, with the new command to add the new column&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names default to here(1);
dt1=data table("1st");
dt2=data table("2nd file");

dt2 &amp;lt;&amp;lt; New Column( "Minimum Age" );

current data table(dt1);
For(i=1,i&amp;lt;=nrows(dt2), i++,
	dt2:Minimum Age[i] =col min(If(contains(dt2:Name[i],dt1:Name),dt1:age,.));
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Mon, 30 Mar 2020 18:09:28 GMT</pubDate>
    <dc:creator>txnelson</dc:creator>
    <dc:date>2020-03-30T18:09:28Z</dc:date>
    <item>
      <title>Assigning Minimum value to a column</title>
      <link>https://community.jmp.com/t5/Discussions/Assigning-Minimum-value-to-a-column/m-p/254986#M50067</link>
      <description>&lt;P&gt;Hi folks,&lt;/P&gt;&lt;P&gt;I have 2 files.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;1st file:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Jacksmith12_0-1585574698964.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/22655i38E28EE9FD0C71B3/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Jacksmith12_0-1585574698964.png" alt="Jacksmith12_0-1585574698964.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;2nd file :&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Jacksmith12_1-1585574737274.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/22656i3E8E91D9E610416A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Jacksmith12_1-1585574737274.png" alt="Jacksmith12_1-1585574737274.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I am trying to write a script which will search for the Minimum age from the 1st file and assign the lowest age in the 2nd file&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;For e.g. &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The 1st row which has three name &lt;STRONG&gt;&lt;EM&gt;Sam, John, Smith&lt;/EM&gt;&lt;/STRONG&gt; so the Value in the Minimum Age Column should be &lt;EM&gt;&lt;STRONG&gt;Min{Sam, John, Smith}&amp;nbsp; Min{21, 27, 32} = 21&lt;/STRONG&gt;&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;my final output will look something like this:&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.PNG" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/22657i6EC25335F31DC524/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Capture.PNG" alt="Capture.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any suggestions please?&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jun 2023 23:26:47 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Assigning-Minimum-value-to-a-column/m-p/254986#M50067</guid>
      <dc:creator>Jackie_</dc:creator>
      <dc:date>2023-06-09T23:26:47Z</dc:date>
    </item>
    <item>
      <title>Re: Assigning Minimum value to a column</title>
      <link>https://community.jmp.com/t5/Discussions/Assigning-Minimum-value-to-a-column/m-p/254987#M50068</link>
      <description>&lt;P&gt;Attaching the files&lt;/P&gt;</description>
      <pubDate>Mon, 30 Mar 2020 13:35:10 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Assigning-Minimum-value-to-a-column/m-p/254987#M50068</guid>
      <dc:creator>Jackie_</dc:creator>
      <dc:date>2020-03-30T13:35:10Z</dc:date>
    </item>
    <item>
      <title>Re: Assigning Minimum value to a column</title>
      <link>https://community.jmp.com/t5/Discussions/Assigning-Minimum-value-to-a-column/m-p/255026#M50072</link>
      <description>&lt;P&gt;Here is a short script that will do what you want......the key is that most individuals do not realize that what is passed to a calculation function, can be conditional.&amp;nbsp; See the script below&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names default to here(1);
dt1=data table("1st");
dt2=data table("2nd file");

current data table(dt1);
For(i=1,i&amp;lt;=nrows(dt2), i++,
	dt2:Minimum Age[i] =col min(If(contains(dt2:Name[i],dt1:Name),dt1:age,.));
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 30 Mar 2020 14:30:31 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Assigning-Minimum-value-to-a-column/m-p/255026#M50072</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2020-03-30T14:30:31Z</dc:date>
    </item>
    <item>
      <title>Re: Assigning Minimum value to a column</title>
      <link>https://community.jmp.com/t5/Discussions/Assigning-Minimum-value-to-a-column/m-p/255104#M50080</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;A href="https://community.jmp.com/t5/user/viewprofilepage/user-id/2687" target="_blank"&gt;@txnelson&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your help.&amp;nbsp;&lt;/P&gt;&lt;P&gt;2nd file doesn't have Minimum Age Column. How can I create the 2nd column with name "Minimum Age" and then assign the lowest value?&lt;/P&gt;</description>
      <pubDate>Mon, 30 Mar 2020 17:37:11 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Assigning-Minimum-value-to-a-column/m-p/255104#M50080</guid>
      <dc:creator>Jackie_</dc:creator>
      <dc:date>2020-03-30T17:37:11Z</dc:date>
    </item>
    <item>
      <title>Re: Assigning Minimum value to a column</title>
      <link>https://community.jmp.com/t5/Discussions/Assigning-Minimum-value-to-a-column/m-p/255110#M50081</link>
      <description>&lt;P&gt;What kept you from being able to take the example from "&lt;A id="link_29" class="page-link lia-link-navigation lia-custom-event" style="background-attachment: scroll; background-clip: border-box; background-color: transparent; background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: repeat; background-size: auto; box-sizing: border-box; color: #737373; font-family: Arial,Helvetica,sans-serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 1.3333; margin-right: 3px; orphans: 2; outline-color: invert; outline-offset: -2px; outline-style: none; outline-width: 0px; overflow-wrap: break-word; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; transition-delay: 0s; transition-duration: 0.3s; transition-property: all; transition-timing-function: ease; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;" href="https://community.jmp.com/t5/Discussions/Adding-new-columns-to-a-data-table/td-p/56078/jump-to/first-unread-message" target="_blank"&gt;Adding new columns to a data table &lt;/A&gt;" and add it to your script?&lt;/P&gt;
&lt;P&gt;Did you know that you can go to the Scripting Guide, and get examples of how to do things?&amp;nbsp; If not, I very strongly recommend that you familiarize yourself with it.&lt;/P&gt;
&lt;P&gt;Here is the sample script I gave you, with the new command to add the new column&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names default to here(1);
dt1=data table("1st");
dt2=data table("2nd file");

dt2 &amp;lt;&amp;lt; New Column( "Minimum Age" );

current data table(dt1);
For(i=1,i&amp;lt;=nrows(dt2), i++,
	dt2:Minimum Age[i] =col min(If(contains(dt2:Name[i],dt1:Name),dt1:age,.));
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 30 Mar 2020 18:09:28 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Assigning-Minimum-value-to-a-column/m-p/255110#M50081</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2020-03-30T18:09:28Z</dc:date>
    </item>
    <item>
      <title>Re: Assigning Minimum value to a column</title>
      <link>https://community.jmp.com/t5/Discussions/Assigning-Minimum-value-to-a-column/m-p/255127#M50083</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/2687"&gt;@txnelson&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What if the Age values are stored in column properties? How can I import column properties (Age) of 1st_file into the column (Minimum Age) of 2nd file&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Jacksmith12_0-1585596154220.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/22686i2EE9E444D083E49B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Jacksmith12_0-1585596154220.png" alt="Jacksmith12_0-1585596154220.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 30 Mar 2020 19:24:32 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Assigning-Minimum-value-to-a-column/m-p/255127#M50083</guid>
      <dc:creator>Jackie_</dc:creator>
      <dc:date>2020-03-30T19:24:32Z</dc:date>
    </item>
    <item>
      <title>Re: Assigning Minimum value to a column</title>
      <link>https://community.jmp.com/t5/Discussions/Assigning-Minimum-value-to-a-column/m-p/255178#M50090</link>
      <description>&lt;P&gt;First, I need to clarify some terminology.&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;&amp;nbsp;In data table 1st_file, you have 9 columns&lt;/LI&gt;
&lt;LI&gt;In data table 1st_file you have 1 row of data for each column.&amp;nbsp; You do not have what JMP refers to as column properties.&amp;nbsp; If you right click on a column header, and select "Column Properties", you will see an extensive list of items that refer to the particular column that you selected. &amp;nbsp;&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;I mention the above, only because when you used the keywords, Column Property, I immediately went to the idea of JMP Column Properties.&amp;nbsp; That setup a bunch of false assumptions which lead to a bunch of confusion for me.&lt;/P&gt;
&lt;P&gt;That aside, here are a couple the large number of ways one can solve you issue&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dt1 = Data Table( "1st_file" );
dt2 = Data Table( "2nd file" );

dt2 &amp;lt;&amp;lt; New Column( "Minimum Age" );

// Transpose the data into a standard data table format
dt3 = dt1 &amp;lt;&amp;lt; Transpose(
	invisible,
	columns( :Sam, :Andy, :John, :Ed, :Jonny, :Smith, :Scott, :George, :Mathew ),
	Output Table( "Transpose of 1st_file" )
);


Current Data Table( dt3 );
For( i = 1, i &amp;lt;= N Rows( dt2 ), i++,
	dt2:Minimum Age[i] = Col Min( If( Contains( dt2:Name[i], dt3:Label ), dt3:Name( "Row 1" ), . ) );
	Show( dt2:minimum Age[i] );
);

Close( dt3, nosave );&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Take a little more time in processing the data, but a secondary table creation isn''t required.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dt1 = Data Table( "1st_file" );
dt2 = Data Table( "2nd file" );

dt2 &amp;lt;&amp;lt; New Column( "Minimum Age" );

For( i = 1, i &amp;lt;= N Rows( dt2 ), i++,
	ages = {};
	For( k = 1, k &amp;lt;= N Cols( dt1 ), k++,
		If( Contains( dt2:Name[i], (Column( dt1, k ) &amp;lt;&amp;lt; get name) ) &amp;gt; 0,
			Insert Into( ages, Column( dt1, k )[1] )
		);
	);
	dt2:Minimum Age[i] = Min( ages );
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 31 Mar 2020 00:31:58 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Assigning-Minimum-value-to-a-column/m-p/255178#M50090</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2020-03-31T00:31:58Z</dc:date>
    </item>
    <item>
      <title>Re: Assigning Minimum value to a column</title>
      <link>https://community.jmp.com/t5/Discussions/Assigning-Minimum-value-to-a-column/m-p/255180#M50091</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/2687"&gt;@txnelson&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your quick response.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I didn't clarified my question.&amp;nbsp;&lt;/P&gt;&lt;P&gt;1.In data table 1st_file, you have 9 columns &lt;STRONG&gt;Yes&lt;/STRONG&gt;&lt;BR /&gt;2. In data table 1st_file you have 1 row of data for each column.&lt;/P&gt;&lt;P&gt;If you right click on a column header, and select "Column Properties", you will see an&lt;STRONG&gt; extensive list&lt;/STRONG&gt; of items that refer to the particular column that you selected.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Can I import these extensive list values into column of 2nd_file?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Can we use the syntax "&lt;STRONG&gt;Get Property()&lt;/STRONG&gt;"&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;For e.g&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&lt;EM&gt;dt1 &amp;lt;&amp;lt; Get Property("Age");&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;and then use for loop to assign it in the 2nd file?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks again&lt;/P&gt;</description>
      <pubDate>Tue, 31 Mar 2020 00:51:49 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Assigning-Minimum-value-to-a-column/m-p/255180#M50091</guid>
      <dc:creator>Jackie_</dc:creator>
      <dc:date>2020-03-31T00:51:49Z</dc:date>
    </item>
    <item>
      <title>Re: Assigning Minimum value to a column</title>
      <link>https://community.jmp.com/t5/Discussions/Assigning-Minimum-value-to-a-column/m-p/255183#M50092</link>
      <description>&lt;P&gt;The syntax for get property is&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;obj &amp;lt;&amp;lt; Get Property( the property you want to retrive );&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Therefore you would ask for one of the Column Properties for the column Age as:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;:Age &amp;lt;&amp;lt; Get Property( "Spec Limits" );
// or
Column( "Age" ) &amp;lt;&amp;lt; Get Property( "Units" );&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;And JMP allows one to create their own Column Properties, so you could do something like&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt1:Sam &amp;lt;&amp;lt; Set Property("Age", 3);
dt1:Andy &amp;lt;&amp;lt; Set Property("Age", 4);&lt;BR /&gt;theAge = dt1:Andy &amp;lt;&amp;lt; Get Property( "Age" );
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 31 Mar 2020 01:24:41 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Assigning-Minimum-value-to-a-column/m-p/255183#M50092</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2020-03-31T01:24:41Z</dc:date>
    </item>
    <item>
      <title>Re: Assigning Minimum value to a column</title>
      <link>https://community.jmp.com/t5/Discussions/Assigning-Minimum-value-to-a-column/m-p/255347#M50132</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/2687"&gt;@txnelson&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can I define Column index instead of Column name in the above script?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Tue, 31 Mar 2020 20:12:34 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Assigning-Minimum-value-to-a-column/m-p/255347#M50132</guid>
      <dc:creator>Jackie_</dc:creator>
      <dc:date>2020-03-31T20:12:34Z</dc:date>
    </item>
    <item>
      <title>Re: Assigning Minimum value to a column</title>
      <link>https://community.jmp.com/t5/Discussions/Assigning-Minimum-value-to-a-column/m-p/255349#M50134</link>
      <description>&lt;P&gt;Here is one of the examples I gave&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Column( "Age" ) &amp;lt;&amp;lt; Get Property( "Units" );&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;If you examine the documentation on the Column() function in the JSL Syntax Reference, it reads&lt;/P&gt;
&lt;PRE&gt;Column(&amp;lt;dt&amp;gt;, "name", "formatted")
Column(&amp;lt;dt&amp;gt;, n)
	Description
		Gets a reference to the data table column.
	Arguments
		dt Optional reference to a data table. If this is not supplied, the current data table is used.
		name Quoted string that is the name of the column.
		formatted Quoted string that returns the formatted string of the cell value.
		n Column number.&lt;/PRE&gt;
&lt;P&gt;IF you read the example from the Syntax Guide it reads:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;The Column function can also identify a column. For Big Class.jmp, the following expressions
all refer to age, the second column in the table:
	Column( "age" );
	Column( 2 );
	Column( dt, 2 );
	Column( dt, "age" );&lt;/PRE&gt;</description>
      <pubDate>Tue, 31 Mar 2020 20:36:20 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Assigning-Minimum-value-to-a-column/m-p/255349#M50134</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2020-03-31T20:36:20Z</dc:date>
    </item>
    <item>
      <title>Re: Assigning Minimum value to a column</title>
      <link>https://community.jmp.com/t5/Discussions/Assigning-Minimum-value-to-a-column/m-p/255351#M50135</link>
      <description>&lt;P&gt;I mean in this script replacing Column name with Column Index&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dt1 = Data Table( "1st" );
dt2 = Data Table( "2nd file" );

Current Data Table( dt1 );
For( i = 1, i &amp;lt;= N Rows( dt2 ), i++,
	dt2:Minimum Age[i] = Col Min( If( Contains( dt2:Name[i], dt1:Name ), dt1:age, . ) )
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 31 Mar 2020 21:03:25 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Assigning-Minimum-value-to-a-column/m-p/255351#M50135</guid>
      <dc:creator>Jackie_</dc:creator>
      <dc:date>2020-03-31T21:03:25Z</dc:date>
    </item>
    <item>
      <title>Re: Assigning Minimum value to a column</title>
      <link>https://community.jmp.com/t5/Discussions/Assigning-Minimum-value-to-a-column/m-p/255367#M50138</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/2687"&gt;@txnelson&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried to replace column name with column index but it's not running&lt;/P&gt;&lt;P&gt;Any suggestions?&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Names default to here(1);
dt1=data table("1st");
dt2=data table("2nd file");

current data table(dt1);
For(i=1,i&amp;lt;=nrows(dt2), i++,
	dt2:Column(2)[i] =col min(If(contains(dt2:Column(1)[i],dt1:Column(1)),dt1:Column(2),.));
);&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 31 Mar 2020 21:08:36 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Assigning-Minimum-value-to-a-column/m-p/255367#M50138</guid>
      <dc:creator>Jackie_</dc:creator>
      <dc:date>2020-03-31T21:08:36Z</dc:date>
    </item>
    <item>
      <title>Re: Assigning Minimum value to a column</title>
      <link>https://community.jmp.com/t5/Discussions/Assigning-Minimum-value-to-a-column/m-p/255371#M50139</link>
      <description>&lt;P&gt;The Column() function is not&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;d2:Column(2)[I]&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;it is as stated&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Column( dt, 2 )[I]&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;And if the indexes were variables,&amp;nbsp; the completed script would be&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dt1 = Data Table( "1st" );
dt2 = Data Table( "2nd file" );

indexd2minage = 2;
indexd2name = 1;
indexd1name = 1;
indexd1age = 2;


Current Data Table( dt1 );
For( i = 1, i &amp;lt;= N Rows( dt2 ), i++,
	Column( dt2, indexd2minage )[i] =
	Col Min(
		If(
			Contains(
				Column( dt2, indexd2Name )[i],
				as Column( dt1, indexd1Name )
			),
			Column( dt1, indexd1age ),
			.
		)
	)
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 31 Mar 2020 21:31:14 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Assigning-Minimum-value-to-a-column/m-p/255371#M50139</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2020-03-31T21:31:14Z</dc:date>
    </item>
  </channel>
</rss>

