<?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: Create a loop to add column properties to columns that contain a specific header in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Create-a-loop-to-add-column-properties-to-columns-that-contain-a/m-p/266281#M51859</link>
    <description>&lt;P&gt;See if this is what you want&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dt = Current Data Table();
a = "Norm";
col = dt &amp;lt;&amp;lt; get column names( string );
nc = N Items( col );
For( i = 1, i &amp;lt;= nc, i++,
	If( Contains( col[i], a ),show(col[i]);
		column(col[i]) &amp;lt;&amp;lt; Set Property( "Axis", Add Ref Line( 200, "Dotted", "Red", "", 2 ) )
	)
);
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 13 May 2020 02:01:00 GMT</pubDate>
    <dc:creator>txnelson</dc:creator>
    <dc:date>2020-05-13T02:01:00Z</dc:date>
    <item>
      <title>Create a loop to add column properties to columns that contain a specific header</title>
      <link>https://community.jmp.com/t5/Discussions/Create-a-loop-to-add-column-properties-to-columns-that-contain-a/m-p/266270#M51854</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Being still new with JSL, I'm still struggling with the implementation of certain concepts namely looping.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any way, I'm trying to create a script which would add to any column in a table in which the header contains "Norm" a number of specific column properties.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt=current data table();
a = "Norm";
col = dt &amp;lt;&amp;lt; get column names( string );
nc = N Items( col );
For( i = 1, i &amp;lt;= nc, i++,
If( Contains( col[i], a ),
col[i]&amp;lt;&amp;lt;Add Column Properties(
	Set Property( "Axis", {Add Ref Line( 200, "Dotted", "Red", "", 2 )} )
)
)
);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Unfortunately, I'm clearly missing something fundamental and the script is not going anywhere.Some guidance would be greatly appreciated.&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;P&gt;Sebastien&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 13 May 2020 00:14:27 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Create-a-loop-to-add-column-properties-to-columns-that-contain-a/m-p/266270#M51854</guid>
      <dc:creator>Sburel</dc:creator>
      <dc:date>2020-05-13T00:14:27Z</dc:date>
    </item>
    <item>
      <title>Re: Create a loop to add column properties to columns that contain a specific header</title>
      <link>https://community.jmp.com/t5/Discussions/Create-a-loop-to-add-column-properties-to-columns-that-contain-a/m-p/266281#M51859</link>
      <description>&lt;P&gt;See if this is what you want&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dt = Current Data Table();
a = "Norm";
col = dt &amp;lt;&amp;lt; get column names( string );
nc = N Items( col );
For( i = 1, i &amp;lt;= nc, i++,
	If( Contains( col[i], a ),show(col[i]);
		column(col[i]) &amp;lt;&amp;lt; Set Property( "Axis", Add Ref Line( 200, "Dotted", "Red", "", 2 ) )
	)
);
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 13 May 2020 02:01:00 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Create-a-loop-to-add-column-properties-to-columns-that-contain-a/m-p/266281#M51859</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2020-05-13T02:01:00Z</dc:date>
    </item>
    <item>
      <title>Re: Create a loop to add column properties to columns that contain a specific header</title>
      <link>https://community.jmp.com/t5/Discussions/Create-a-loop-to-add-column-properties-to-columns-that-contain-a/m-p/266410#M51886</link>
      <description>Worked like a charm.&lt;BR /&gt;&lt;BR /&gt;Thanks a lot for the very rapid suggestion.&lt;BR /&gt;&lt;BR /&gt;Much appreciated</description>
      <pubDate>Wed, 13 May 2020 14:45:38 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Create-a-loop-to-add-column-properties-to-columns-that-contain-a/m-p/266410#M51886</guid>
      <dc:creator>Sburel</dc:creator>
      <dc:date>2020-05-13T14:45:38Z</dc:date>
    </item>
  </channel>
</rss>

