<?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: Update Column Axis Reference Line based on data from another data table in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Update-Column-Axis-Reference-Line-based-on-data-from-another/m-p/438547#M68717</link>
    <description>&lt;P&gt;What is the Insert() function doing here? I can't seem to it to work.&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);

dt = Open("$SAMPLE_DATA/Big Class.jmp");
dtLookup = New Table("Lookup Table",
	Add Rows(2),
	New Column("Column Name", Character, Nominal, Set Values({"weight", "height"})),
	New Column("P50", "Continuous", Set Values([100, 61])),
	New Column("P95", "Continuous", Set Values([120, 70]))
);

col_name_list = dt &amp;lt;&amp;lt; get column names(string);
col_name_list_lookup = dtLookup &amp;lt;&amp;lt; get column names(string);

For Each Row(dtLookup,
	col_name  =:"Column Names"n;
	If(contains(col_name_list,col_name),
		old_properties = Column(dt, col_name) &amp;lt;&amp;lt; get property("Axis");
		old_with_new = Insert(old_properties, 
		{Expr(	Add Ref Line(Expr(:P50), "Dashed", "Orange", "P50", 2),
				Add Ref Line(Expr(:P95), "Dashed", "Orange", "P95", 2)
			)
		});
		Eval(EvalExpr(Column(dt, col_name) &amp;lt;&amp;lt; Set Property("Axis",{
			Expr(old_with_new)	
		})));
	);
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Fri, 19 Nov 2021 19:26:30 GMT</pubDate>
    <dc:creator>Heart_To_Tell</dc:creator>
    <dc:date>2021-11-19T19:26:30Z</dc:date>
    <item>
      <title>Update Column Axis Reference Line based on data from another data table</title>
      <link>https://community.jmp.com/t5/Discussions/Update-Column-Axis-Reference-Line-based-on-data-from-another/m-p/438466#M68707</link>
      <description>&lt;P&gt;I'm looking to add column reference lines based on data from another data able. An example, using "Big Class" would update columns "weight' and "height" with P50 and P95 values from a lookup data table.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The rows on the lookup data table correspond to the column names in the main table. The reference lines would need to assign the label value from the lookup table column name "P50" or "P95" and the value is from the row in that column.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Example showing the added column axis reference lines:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Heart_To_Tell_0-1637339675822.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/37701i2ADD3407FF0F49A9/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Heart_To_Tell_0-1637339675822.png" alt="Heart_To_Tell_0-1637339675822.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Example for Lookup data table:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Heart_To_Tell_1-1637339675834.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/37700i0B917A87E63DDDA5/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Heart_To_Tell_1-1637339675834.png" alt="Heart_To_Tell_1-1637339675834.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm not very well versed in JSL so I appreciate any help that comes my way on this topic. I've created a script but it's not doing what I want.&lt;/P&gt;
&lt;P&gt;It seems to corrupt the column, sometimes when plotting a distribution it is showing all '0' values. Also, if I'm trying to add both P50 and P95 ref lines, only the last one is saved to the column and it saves it on both columns.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE class="language-jsl"&gt;&lt;CODE&gt;dt = Open ("C:\Program Files\SAS\JMP\15\Samples\Data\big class.jmp");
dtLookup = New Table( "Lookup Table",
	Add Rows( 2 ),
	New Column( "Column Name",
		Character,
		Nominal,
		Set Values( {"weight", "height"} )
	),
	New Column( "P50",
		"Continuous",
		Set Values( [100, 61] )
	),
	New Column( "P95",
		"Continuous",
		Set Values( [120, 70] )
	)
);

col_name_list = dt &amp;lt;&amp;lt; get column names(string);
col_name_list_lookup = dtLookup &amp;lt;&amp;lt; get column names(string);
 
numRowsLookup = N Rows( dtLookup );
numColsLookup = N Cols( dtLookup );

for(n=1,n&amp;lt;=numRowsLookup,n++,
	col_name = dtLookup[n,1];
	If(contains(col_name_list,col_name),
		for(j=2,j&amp;lt;=numColsLookup,j++,
		col = Column(dt, col_name);
		col_name_Lookup = col_name_list_lookup[j];
		value = Column(dtLookup,col_name_Lookup)[n];
		col &amp;lt;&amp;lt;
			Set Property("Axis", 
			{
				//Add Ref Line( 63, "Dashed", "Orange", "P50", 2 )
				Add Ref Line( value, "Dashed", "Orange", col_name_Lookup, 2 )
			});
		);
	);
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Thank you,&lt;/P&gt;
&lt;P&gt;Roger&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jun 2023 18:05:49 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Update-Column-Axis-Reference-Line-based-on-data-from-another/m-p/438466#M68707</guid>
      <dc:creator>Heart_To_Tell</dc:creator>
      <dc:date>2023-06-09T18:05:49Z</dc:date>
    </item>
    <item>
      <title>Re: Update Column Axis Reference Line based on data from another data table</title>
      <link>https://community.jmp.com/t5/Discussions/Update-Column-Axis-Reference-Line-based-on-data-from-another/m-p/438514#M68713</link>
      <description>&lt;P&gt;Here is an example script. My guess is that the Axis gets overridden if you try to do it multiple times like that, so you might have to add them in same &amp;lt;&amp;lt; Set Property (multiple different ways of building the expression to do it).&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);

dt = Open("$SAMPLE_DATA/Big Class.jmp");
dtLookup = New Table("Lookup Table",
	Add Rows(2),
	New Column("Column Name", Character, Nominal, Set Values({"weight", "height"})),
	New Column("P50", "Continuous", Set Values([100, 61])),
	New Column("P95", "Continuous", Set Values([120, 70]))
);

For Each Row(dtLookup,
	col_name  =:"Column Name"n;
	//because we know we have only two lines to add and they are always added
	Eval(EvalExpr(Column(dt, col_name) &amp;lt;&amp;lt; Set Property("Axis", {
		Add Ref Line(Expr(:P50), "Dashed", "Orange", "P50", 2),
		Add Ref Line(Expr(:P95), "Dashed", "Orange", "P95", 2)	
		}))
	);
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jthi_0-1637343301895.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/37703iF9EDBA5EA905DD8A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jthi_0-1637343301895.png" alt="jthi_0-1637343301895.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Not sure if &lt;A href="https://community.jmp.com/t5/JSL-Cookbook/Insert-one-expression-into-another-using-Eval-Insert-Eval-Expr/ta-p/48998" target="_blank" rel="noopener"&gt;Eval(EvalExpr())&lt;/A&gt; is necessary here but it wont hurt.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 19 Nov 2021 17:38:11 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Update-Column-Axis-Reference-Line-based-on-data-from-another/m-p/438514#M68713</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2021-11-19T17:38:11Z</dc:date>
    </item>
    <item>
      <title>Re: Update Column Axis Reference Line based on data from another data table</title>
      <link>https://community.jmp.com/t5/Discussions/Update-Column-Axis-Reference-Line-based-on-data-from-another/m-p/438525#M68714</link>
      <description>&lt;P&gt;Thanks Jarmo. This solution is much simpler but it seems to overwrite any existing axis ref lines. Do you know if there is a way to preserve any Axis Ref Lines that are already present in that column?&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 19 Nov 2021 17:57:21 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Update-Column-Axis-Reference-Line-based-on-data-from-another/m-p/438525#M68714</guid>
      <dc:creator>Heart_To_Tell</dc:creator>
      <dc:date>2021-11-19T17:57:21Z</dc:date>
    </item>
    <item>
      <title>Re: Update Column Axis Reference Line based on data from another data table</title>
      <link>https://community.jmp.com/t5/Discussions/Update-Column-Axis-Reference-Line-based-on-data-from-another/m-p/438529#M68716</link>
      <description>&lt;P&gt;I'm not 100% sure, but maybe you could first get the old Axis properties with &amp;lt;&amp;lt; Get Propery("Axis") and then add to that.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Maybe something like this (there might also be more simple ways):&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;old_properties = Column(dt, "height") &amp;lt;&amp;lt; get property("Axis");
old_with_new = Insert(old_properties, Expr(Add Ref Line(1, "Dashed", "Orange", "P45", 2)));
Eval(EvalExpr(column(dt, "height") &amp;lt;&amp;lt; Set Property("Axis",{expr(old_with_new)})));&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 19 Nov 2021 18:18:33 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Update-Column-Axis-Reference-Line-based-on-data-from-another/m-p/438529#M68716</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2021-11-19T18:18:33Z</dc:date>
    </item>
    <item>
      <title>Re: Update Column Axis Reference Line based on data from another data table</title>
      <link>https://community.jmp.com/t5/Discussions/Update-Column-Axis-Reference-Line-based-on-data-from-another/m-p/438547#M68717</link>
      <description>&lt;P&gt;What is the Insert() function doing here? I can't seem to it to work.&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);

dt = Open("$SAMPLE_DATA/Big Class.jmp");
dtLookup = New Table("Lookup Table",
	Add Rows(2),
	New Column("Column Name", Character, Nominal, Set Values({"weight", "height"})),
	New Column("P50", "Continuous", Set Values([100, 61])),
	New Column("P95", "Continuous", Set Values([120, 70]))
);

col_name_list = dt &amp;lt;&amp;lt; get column names(string);
col_name_list_lookup = dtLookup &amp;lt;&amp;lt; get column names(string);

For Each Row(dtLookup,
	col_name  =:"Column Names"n;
	If(contains(col_name_list,col_name),
		old_properties = Column(dt, col_name) &amp;lt;&amp;lt; get property("Axis");
		old_with_new = Insert(old_properties, 
		{Expr(	Add Ref Line(Expr(:P50), "Dashed", "Orange", "P50", 2),
				Add Ref Line(Expr(:P95), "Dashed", "Orange", "P95", 2)
			)
		});
		Eval(EvalExpr(Column(dt, col_name) &amp;lt;&amp;lt; Set Property("Axis",{
			Expr(old_with_new)	
		})));
	);
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 19 Nov 2021 19:26:30 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Update-Column-Axis-Reference-Line-based-on-data-from-another/m-p/438547#M68717</guid>
      <dc:creator>Heart_To_Tell</dc:creator>
      <dc:date>2021-11-19T19:26:30Z</dc:date>
    </item>
    <item>
      <title>Re: Update Column Axis Reference Line based on data from another data table</title>
      <link>https://community.jmp.com/t5/Discussions/Update-Column-Axis-Reference-Line-based-on-data-from-another/m-p/438612#M68728</link>
      <description>&lt;P&gt;You could try debugging the code in parts. You can "run" For Each Row with row by row by using Row() = rownumber instead of the loop.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;
//For Each Row(dtLookup,
	Row() = 1;
	col_name  =:"Column Name"n;
	If(contains(col_name_list,col_name),
		old_properties = Column(dt, col_name) &amp;lt;&amp;lt; get property("Axis");
		old_with_new = Insert(old_properties, 
		{Expr(	Add Ref Line(Expr(:P50), "Dashed", "Orange", "P50", 2),
				Add Ref Line(Expr(:P95), "Dashed", "Orange", "P95", 2)
			)
		});
		Eval(EvalExpr(Column(dt, col_name) &amp;lt;&amp;lt; Set Property("Axis",{
			Expr(old_with_new)	
		})));
	);
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;And then start running code row by row:&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;old_properties = Column(dt, col_name) &amp;lt;&amp;lt; get property("Axis");
//Empty()&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Some break-points for debugging (I don't use Debugger, but it would most likely be even easier with it):&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);

dt = Open("$SAMPLE_DATA/Big Class.jmp");
dtLookup = New Table("Lookup Table",
	Add Rows(2),
	New Column("Column Name", Character, Nominal, Set Values({"weight", "height"})),
	New Column("P50", "Continuous", Set Values([100, 61])),
	New Column("P95", "Continuous", Set Values([120, 70]))
);

col_name_list = dt &amp;lt;&amp;lt; get column names(string);
col_name_list_lookup = dtLookup &amp;lt;&amp;lt; get column names(string);

Column(dt, "weight") &amp;lt;&amp;lt; Set Property("Axis", {Add Ref Line(10, "Dashed", "Red", "P10", 2)}); //debugging axis property
stop();

For Each Row(dtLookup,
	stop();
	Row() = 1;
	col_name  = Column(dtLookup, "Column Name")[Row()]; //easier to work with without For Each Row
	If(contains(col_name_list,col_name),
		old_properties = Column(dt, col_name) &amp;lt;&amp;lt; get property("Axis");
		stop();
		new_properties = EvalExpr({Add Ref Line(Expr(:P50), "Dashed", "Orange", "P50", 2), Add Ref Line(Expr(:P95), "Dashed", "Orange", "P95", 2)});
		stop();
		If(!IsList(old_properties),
			prop_to_add = Name Expr(new_properties),
			prop_to_add = Insert(old_properties, new_properties);
		);
		show(prop_to_add);
		stop();
		Eval(EvalExpr(Column(dt, col_name) &amp;lt;&amp;lt; Set Property("Axis",{Expr(prop_to_add)})));
	);
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Scripting Index for insert:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jthi_0-1637395021620.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/37724i8938A84CD3F10119/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jthi_0-1637395021620.png" alt="jthi_0-1637395021620.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Some links to assist with scripting:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.jmp.com/content/dam/jmp/documents/en/support/jmp161/jsl-syntax-reference.pdf" target="_blank" rel="noopener"&gt;JSL Syntax Reference&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.jmp.com/content/dam/jmp/documents/en/support/jmp161/scripting-guide.pdf" target="_blank" rel="noopener"&gt;Scripting Guide&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.jmp.com/support/help/en/16.1/#page/jmp/what-jsl-can-do-for-you.shtml#" target="_blank" rel="noopener"&gt;JMP 16 Help&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 20 Nov 2021 08:20:25 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Update-Column-Axis-Reference-Line-based-on-data-from-another/m-p/438612#M68728</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2021-11-20T08:20:25Z</dc:date>
    </item>
    <item>
      <title>Re: Update Column Axis Reference Line based on data from another data table</title>
      <link>https://community.jmp.com/t5/Discussions/Update-Column-Axis-Reference-Line-based-on-data-from-another/m-p/439210#M68771</link>
      <description>&lt;P&gt;Hi Jarmo,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I appreciate the help on this. Unfortunately I was not seeing the old and new axis properties getting updated here. I saw "prop_to_add" list gets appended with old and new properties but when I check the actual axis settings, I only saw the two new properties.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;After removing the braces from the set properties, it was able to work as expected!&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Now I just need to work on making this work on N number of lookup columns.&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);

dt = Open("$SAMPLE_DATA/Big Class.jmp");
dtLookup = New Table("Lookup Table",
	Add Rows(2),
	New Column("Column Name", Character, Nominal, Set Values({"weight", "height"})),
	New Column("P50", "Continuous", Set Values([100, 61])),
	New Column("P95", "Continuous", Set Values([120, 70]))
);

col_name_list = dt &amp;lt;&amp;lt; get column names(string);
col_name_list_lookup = dtLookup &amp;lt;&amp;lt; get column names(string);

Column(dt, "weight") &amp;lt;&amp;lt; Set Property("Axis", {Add Ref Line(10, "Dashed", "Red", "P10", 2)}); //debugging axis property
//stop();

For Each Row(dtLookup,
	//stop();
	Row() = 1;
	col_name  = Column(dtLookup, "Column Name")[Row()]; //easier to work with without For Each Row
	If(contains(col_name_list,col_name),
		old_properties = Column(dt, col_name) &amp;lt;&amp;lt; get property("Axis");
		//stop();
		new_properties = EvalExpr({Add Ref Line(Expr(:P50), "Dashed", "Orange", "P50", 2), Add Ref Line(Expr(:P95), "Dashed", "Orange", "P95", 2)});
		//stop();
		If(!IsList(old_properties),
			prop_to_add = Name Expr(new_properties),
			prop_to_add = Insert(old_properties, new_properties);
		);
		show(prop_to_add);
		//stop();
		//Eval(EvalExpr(Column(dt, col_name) &amp;lt;&amp;lt; Set Property("Axis",{Expr(prop_to_add)}))); // Didn't work with the braces.
		Eval(EvalExpr(Column(dt, col_name) &amp;lt;&amp;lt; Set Property("Axis",expr(prop_to_add)))); //Worked when removing the braces.
	);
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 23 Nov 2021 07:36:17 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Update-Column-Axis-Reference-Line-based-on-data-from-another/m-p/439210#M68771</guid>
      <dc:creator>Heart_To_Tell</dc:creator>
      <dc:date>2021-11-23T07:36:17Z</dc:date>
    </item>
    <item>
      <title>Re: Update Column Axis Reference Line based on data from another data table</title>
      <link>https://community.jmp.com/t5/Discussions/Update-Column-Axis-Reference-Line-based-on-data-from-another/m-p/439482#M68789</link>
      <description>&lt;P&gt;Final update here. Special thanks to Jarmo.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I was able to get this working as intended. Final code here for future reference.&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);
namespace("here")&amp;lt;&amp;lt;remove(namespace("here")&amp;lt;&amp;lt;getkeys);

dt = Open("$SAMPLE_DATA/Big Class.jmp");
dtLookup = New Table("Lookup Table",
	Add Rows(2),
	New Column("Column Name", Character, Nominal, Set Values({"weight", "height"})),
	New Column("P50", "Continuous", Set Values([100, 61])),
	New Column("P95", "Continuous", Set Values([120, 70]))&lt;BR /&gt;    New Column("P99", "Continuous", Set Values([125, 75]))
);


col_name_list = dt &amp;lt;&amp;lt; get column names(string);
col_name_list_lookup = dtLookup &amp;lt;&amp;lt; get column names(string);


For Each Row(dtLookup,
	col_name  =:"Analysis Columns"n; //Ref column name
	new_properties = {}; // re-init
	old_properties = {}; // re-init
	If(contains(col_name_list,col_name),
		old_properties = Column(dt, col_name) &amp;lt;&amp;lt; get property("Axis");
		//Add Multiple Ref Lines
		For( i = 2, i &amp;lt;= N Items( col_name_list_lookup ), i++,
			new_properties_temp = 
			EvalExpr({
					Add Ref Line(Expr(as column(dtLookup,col_name_list_lookup[i])), "Dashed", Expr(Color To RGB( 67 )),Expr(char(col_name_list_lookup[i])), 1)
					});
			
			new_properties = Insert(new_properties, new_properties_temp);	
		);
		//end Add Multiple 	
		
		//Add Specified Reference Lines
		//new_properties = EvalExpr({
		//		Add Ref Line(Expr(:P50), "Dashed", "Orange", "P50", 2), 
		//		Add Ref Line(Expr(:P95), "Dashed", "Orange", "P95", 2)
		//});
		
		If(!IsList(old_properties),
			prop_to_add = Name Expr(new_properties),
			prop_to_add = Insert(old_properties, new_properties);
		);
		//show(prop_to_add); // for debug
		Eval(EvalExpr(Column(dt, col_name) &amp;lt;&amp;lt; Set Property("Axis",expr(prop_to_add)))); //Applies the new axis settings.
	);
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 23 Nov 2021 22:13:25 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Update-Column-Axis-Reference-Line-based-on-data-from-another/m-p/439482#M68789</guid>
      <dc:creator>Heart_To_Tell</dc:creator>
      <dc:date>2021-11-23T22:13:25Z</dc:date>
    </item>
    <item>
      <title>Re: Update Column Axis Reference Line based on data from another data table</title>
      <link>https://community.jmp.com/t5/Discussions/Update-Column-Axis-Reference-Line-based-on-data-from-another/m-p/921058#M107981</link>
      <description>&lt;P&gt;It is very helpful JSL script to import data directly into Axis. If that possible to add below label setting into JSL script above?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I try to add / modify your code with additional setting come with error.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV&gt;&lt;SPAN&gt; For( i = 2, i &amp;lt;= N Items( col_name_list_lookup ), i++,&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt; new_properties_temp =&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt; EvalExpr({&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt; Add Ref Line(Expr(as column(dtLookup,col_name_list_lookup[i])), "Dashed", Expr(Color To RGB( 0 )),Expr(char(col_name_list_lookup[i])), 1,&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt; Label Position( "Inside Inline" ), Opposite Axis( 1 )) &lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt; )&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt; });&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt; new_properties = Insert(new_properties, new_properties_temp); &lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt; );&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="OneNorthJMP_0-1766466811697.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/89523iDBCC07A2E8AC13B2/image-size/medium?v=v2&amp;amp;px=400" role="button" title="OneNorthJMP_0-1766466811697.png" alt="OneNorthJMP_0-1766466811697.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 23 Dec 2025 05:15:32 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Update-Column-Axis-Reference-Line-based-on-data-from-another/m-p/921058#M107981</guid>
      <dc:creator>OneNorthJMP</dc:creator>
      <dc:date>2025-12-23T05:15:32Z</dc:date>
    </item>
    <item>
      <title>Re: Update Column Axis Reference Line based on data from another data table</title>
      <link>https://community.jmp.com/t5/Discussions/Update-Column-Axis-Reference-Line-based-on-data-from-another/m-p/921063#M107982</link>
      <description>&lt;P&gt;Make sure all your brackets are in correct position&lt;/P&gt;
&lt;LI-SPOILER&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;For(i = 2, i &amp;lt;= N Items(col_name_list_lookup), i++,
	new_properties_temp = Eval Expr(
		{Add Ref Line(
			Expr(As Column(dtLookup, col_name_list_lookup[i])),
			"Dashed",
			Expr(Color To RGB(0)),
			Expr(Char(col_name_list_lookup[i])),
			1,
			Label Position("Inside Inline"),
			Opposite Axis(1)
		)}
	);
 
	new_properties = Insert(new_properties, new_properties_temp);
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;/LI-SPOILER&gt;</description>
      <pubDate>Tue, 23 Dec 2025 06:11:25 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Update-Column-Axis-Reference-Line-based-on-data-from-another/m-p/921063#M107982</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2025-12-23T06:11:25Z</dc:date>
    </item>
  </channel>
</rss>

