<?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: Issue defining cell value as variable in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Issue-defining-cell-value-as-variable/m-p/507409#M73686</link>
    <description>&lt;P&gt;I suspect that your dt1_spec_limits data table is not completed before the Variability Chart is run.&amp;nbsp; Try adding&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Wait( 0 );&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;just before the // SPLIT POINT.&lt;/P&gt;</description>
    <pubDate>Mon, 13 Jun 2022 10:01:44 GMT</pubDate>
    <dc:creator>txnelson</dc:creator>
    <dc:date>2022-06-13T10:01:44Z</dc:date>
    <item>
      <title>Issue defining cell value as variable</title>
      <link>https://community.jmp.com/t5/Discussions/Issue-defining-cell-value-as-variable/m-p/507339#M73684</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I want to use values from one datatable as reference lines on a Variability plot based on a separate datatable. My current code is below, it hopefully makes sense as shared. I am using JMP 15.2&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My issue is that when I run all of this at once, I do not get any reference lines on my plot.&lt;/P&gt;&lt;P&gt;However, if I first run only the section before '//SPLIT POINT' and then separately run the section after '//SPLINT POINT', it works without issue (reference lines are visible on my plot).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;A final point is that if I use&amp;nbsp;&lt;/P&gt;&lt;P&gt;Target = dt1_spec_limits::Name( "data_column_A" )[1]&lt;/P&gt;&lt;P&gt;instead of&amp;nbsp;&lt;/P&gt;&lt;P&gt;Target = dt1_spec_limits:Name("Graph_Target_line")[1]&lt;/P&gt;&lt;P&gt;the reference line shows on the plot, even when the whole script is run as one. So I think it is something to do with the calculations updating in the datatable?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any insights would be greatly appreciated, thanks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;//join two datatables to create table of spec limits
dt1_spec_limits = dt1_mean_join &amp;lt;&amp;lt;
Join(
With( dt1_std_join ),
By Matching Columns( :Join = :Join ),
Drop multiples( 0, 0 ),
Include Nonmatches( 0, 0 ),
Preserve main table order( 1 )
)
;
//calculate the Target, USL and LSL values
New Column( "Graph_Target_line",
Numeric,
"Continuous",
Format( "Best", 6 ),
Formula( :Name( "data_column_A" ) )
)
;
New Column( "Graph_USL",
Numeric,
"Continuous",
Format( "Best", 6 ),
Formula(
:Name( "data_column_A" ) + 3.15 *
:Name( "data_column_B" )
)
)
;
New Column( "Graph_LSL",
Numeric,
"Continuous",
Format( "Best", 6 ),
Formula(
:Name( "data_column_A" ) - 3.15 *
:Name( "data_column_B" )
)
)
;
//SPLIT POINT
//assign the variables to be used in the Variability plot
USL = dt1_spec_limits :Name("Graph_USL")[1]
;
LSL = dt1_spec_limits:Name("Graph_LSL")[1]
;
Target = dt1_spec_limits:Name("Graph_Target_line")[1]
;
//Plot based on data from one table with the reference lines based on above
Current data table(dt1_plotting_data)
;
Variability Chart(
Y( :Name( "column_1" ) ),
X( :Equipment, :Date, :Time ),
Analysis Type( "Choose best analysis (EMS REML Bayesian)" ),
Std Dev Chart( 0 ),
SendToReport(
Dispatch(
{"Variability Chart for column_1"},
"2",
ScaleBox,
{
Add Ref Line( 0, "Dotted", "Medium Light Gray", "", 1 ),
Add Ref Line( Target, "Solid", "Medium Dark Green", "Target", 1 ),
Add Ref Line( USL, "Solid", "Medium Dark Red", "USL", 1 ),
Add Ref Line( LSL, "Solid", "Medium Dark Red", "LSL", 1 )}
),
Dispatch(
{"Variability Chart for column_1"},
"Variability Chart",
FrameBox,
{Row Legend(
Tool_MM,
Color( 1 ),
Color Theme( "JMP Default" ),
Marker( 0 ),
Marker Theme( "" ),
Continuous Scale( 0 ),
Reverse Scale( 0 ),
Excluded Rows( 0 )
)}
)
)
)&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 11 Jun 2023 11:24:52 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Issue-defining-cell-value-as-variable/m-p/507339#M73684</guid>
      <dc:creator>JB-2</dc:creator>
      <dc:date>2023-06-11T11:24:52Z</dc:date>
    </item>
    <item>
      <title>Re: Issue defining cell value as variable</title>
      <link>https://community.jmp.com/t5/Discussions/Issue-defining-cell-value-as-variable/m-p/507409#M73686</link>
      <description>&lt;P&gt;I suspect that your dt1_spec_limits data table is not completed before the Variability Chart is run.&amp;nbsp; Try adding&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Wait( 0 );&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;just before the // SPLIT POINT.&lt;/P&gt;</description>
      <pubDate>Mon, 13 Jun 2022 10:01:44 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Issue-defining-cell-value-as-variable/m-p/507409#M73686</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2022-06-13T10:01:44Z</dc:date>
    </item>
    <item>
      <title>Re: Issue defining cell value as variable</title>
      <link>https://community.jmp.com/t5/Discussions/Issue-defining-cell-value-as-variable/m-p/507422#M73687</link>
      <description>&lt;P&gt;Thanks very much&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 13 Jun 2022 10:18:11 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Issue-defining-cell-value-as-variable/m-p/507422#M73687</guid>
      <dc:creator>JB-2</dc:creator>
      <dc:date>2022-06-13T10:18:11Z</dc:date>
    </item>
  </channel>
</rss>

