<?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: JMP SCRIPT: Creation of a graph based on a user selection variable in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/JMP-SCRIPT-Creation-of-a-graph-based-on-a-user-selection/m-p/611708#M81200</link>
    <description>&lt;P&gt;The user selection is based on a list. However the selection made by the user from a list doesn't match with the datatable and I need to concatenate with "&amp;nbsp; (ppm)" in order to have the same variable name...&lt;/P&gt;&lt;P&gt;Then, I want to make the graph based on the "Y" concatenate with "ppm".&lt;/P&gt;&lt;P&gt;However, the "Y" is not recognize by the graph builder...&amp;nbsp;&lt;/P&gt;&lt;P&gt;Do you have any suggestion&amp;nbsp;&lt;SPAN&gt;to help me out with the naming of the Y ?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks a lot for your answer&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 14 Mar 2023 10:46:48 GMT</pubDate>
    <dc:creator>Sebastienlg</dc:creator>
    <dc:date>2023-03-14T10:46:48Z</dc:date>
    <item>
      <title>JMP SCRIPT: Creation of a graph based on a user selection variable</title>
      <link>https://community.jmp.com/t5/Discussions/JMP-SCRIPT-Creation-of-a-graph-based-on-a-user-selection/m-p/611049#M81161</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like to create a graph based on a user filter selection.&lt;/P&gt;&lt;P&gt;However, JMP doesn't recognize the variable "Y" choosen by the user, and an error occurs.&lt;/P&gt;&lt;P&gt;Here is my code:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Y = concat(Y,"  (ppm)");

graph = RAW_DATA_TABLE &amp;lt;&amp;lt; 
				Control Chart Builder(
					Size( 534, 450 ),
					Show Two Shewhart Charts( 0 ),
					Show Control Panel( 0 ),			
					Sort by Row Order( 1 ),
					Variables( Y( :"&lt;U&gt;&lt;STRONG&gt;Y&lt;/STRONG&gt;&lt;/U&gt;" ),Subgroup( :Numéro de lot ), Phase(:"Period")),	
					Get Limits(LIMIT_TABLE),
				)&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Does anyone have a suggestion to help me out with the naming of the Y ?&lt;/P&gt;&lt;P&gt;Thanks a lot,&lt;/P&gt;&lt;P&gt;Sébastien&lt;/P&gt;</description>
      <pubDate>Thu, 08 Jun 2023 16:29:39 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JMP-SCRIPT-Creation-of-a-graph-based-on-a-user-selection/m-p/611049#M81161</guid>
      <dc:creator>Sebastienlg</dc:creator>
      <dc:date>2023-06-08T16:29:39Z</dc:date>
    </item>
    <item>
      <title>Re: JMP SCRIPT: Creation of a graph based on a user selection variable</title>
      <link>https://community.jmp.com/t5/Discussions/JMP-SCRIPT-Creation-of-a-graph-based-on-a-user-selection/m-p/611354#M81173</link>
      <description>&lt;P&gt;I'm not exactly sure what you are trying to do on line 1. Trying to build the column name based on something? How is Y chosen by user? Where does the "&amp;nbsp;&amp;nbsp;&amp;nbsp; (ppm)" come from?&lt;/P&gt;</description>
      <pubDate>Mon, 13 Mar 2023 16:43:32 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JMP-SCRIPT-Creation-of-a-graph-based-on-a-user-selection/m-p/611354#M81173</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2023-03-13T16:43:32Z</dc:date>
    </item>
    <item>
      <title>Re: JMP SCRIPT: Creation of a graph based on a user selection variable</title>
      <link>https://community.jmp.com/t5/Discussions/JMP-SCRIPT-Creation-of-a-graph-based-on-a-user-selection/m-p/611408#M81178</link>
      <description>&lt;P&gt;The Column Dialog() command allows users to select columns for roles in later analysis. You should be able to delete/modify from the example from the scripting index to get what you need, i.e., just keep the things relating to the "Y" column.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Jed_Campbell_0-1678729722929.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/50972iE6C93F75BD69840E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Jed_Campbell_0-1678729722929.png" alt="Jed_Campbell_0-1678729722929.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 13 Mar 2023 17:49:36 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JMP-SCRIPT-Creation-of-a-graph-based-on-a-user-selection/m-p/611408#M81178</guid>
      <dc:creator>Jed_Campbell</dc:creator>
      <dc:date>2023-03-13T17:49:36Z</dc:date>
    </item>
    <item>
      <title>Re: JMP SCRIPT: Creation of a graph based on a user selection variable</title>
      <link>https://community.jmp.com/t5/Discussions/JMP-SCRIPT-Creation-of-a-graph-based-on-a-user-selection/m-p/611708#M81200</link>
      <description>&lt;P&gt;The user selection is based on a list. However the selection made by the user from a list doesn't match with the datatable and I need to concatenate with "&amp;nbsp; (ppm)" in order to have the same variable name...&lt;/P&gt;&lt;P&gt;Then, I want to make the graph based on the "Y" concatenate with "ppm".&lt;/P&gt;&lt;P&gt;However, the "Y" is not recognize by the graph builder...&amp;nbsp;&lt;/P&gt;&lt;P&gt;Do you have any suggestion&amp;nbsp;&lt;SPAN&gt;to help me out with the naming of the Y ?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks a lot for your answer&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Mar 2023 10:46:48 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JMP-SCRIPT-Creation-of-a-graph-based-on-a-user-selection/m-p/611708#M81200</guid>
      <dc:creator>Sebastienlg</dc:creator>
      <dc:date>2023-03-14T10:46:48Z</dc:date>
    </item>
    <item>
      <title>Re: JMP SCRIPT: Creation of a graph based on a user selection variable</title>
      <link>https://community.jmp.com/t5/Discussions/JMP-SCRIPT-Creation-of-a-graph-based-on-a-user-selection/m-p/611721#M81202</link>
      <description>&lt;P&gt;If you are sure that the column exists you could try wrapping the Y variable (I would use more descriptive variable name here) to Eval&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;y_column = Concat(Y, "  (ppm)");

graph = RAW_DATA_TABLE &amp;lt;&amp;lt; Control Chart Builder(
	Size(534, 450),
	Show Two Shewhart Charts(0),
	Show Control Panel(0),
	Sort by Row Order(1),
	Variables(Y(Eval(y_column)), Subgroup(:Numéro de lot), Phase(:"Period")),
	Get Limits(LIMIT_TABLE),
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);
y_col = "Weight";
dt = Open("$SAMPLE_DATA/Quality Control/Coating.jmp");
dt &amp;lt;&amp;lt; Control Chart Builder(Variables(Y(Eval(y_col)), Subgroup(:Sample)));&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Mar 2023 11:44:25 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JMP-SCRIPT-Creation-of-a-graph-based-on-a-user-selection/m-p/611721#M81202</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2023-03-14T11:44:25Z</dc:date>
    </item>
    <item>
      <title>Re: JMP SCRIPT: Creation of a graph based on a user selection variable</title>
      <link>https://community.jmp.com/t5/Discussions/JMP-SCRIPT-Creation-of-a-graph-based-on-a-user-selection/m-p/611746#M81204</link>
      <description>&lt;P&gt;Line 1 of your code is not a good practice - you are redefining Y in terms of itself.&lt;/P&gt;
&lt;P&gt;Try this:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;raw_data_table = New Table( "Test",Add Rows( 4 ),
	New Column( "Col1  (ppm)", Numeric, "Continuous", Format( "Best", 12 ),
		Set Values( [1, 2, 3, 4] ) ),
	New Column( "Numéro de lot", Character, "Nominal",
		Set Values( {"a", "a", "b", "b"} ) ),
	New Column( "Period", Numeric, "Continuous", Format( "Best", 12 ),
		Set Values( [1, 2, 3, 4] ) )
);

Y = "Col1";		// Selected from your dialog box
ycol = Y || "  (ppm)";

graph = RAW_DATA_TABLE &amp;lt;&amp;lt; 
				Control Chart Builder(
					Size( 534, 450 ),
					Show Two Shewhart Charts( 0 ),
					Show Control Panel( 0 ),			
					Sort by Row Order( 1 ),
					Variables( Y( column(RAW_DATA_TABLE, ycol) ),Subgroup( :Numéro de lot ), Phase(:"Period")),	
//					Get Limits(LIMIT_TABLE),
				);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;I commented out the reference to limit_table as I didn't have that data.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Mar 2023 13:26:50 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JMP-SCRIPT-Creation-of-a-graph-based-on-a-user-selection/m-p/611746#M81204</guid>
      <dc:creator>pmroz</dc:creator>
      <dc:date>2023-03-14T13:26:50Z</dc:date>
    </item>
    <item>
      <title>Re: JMP SCRIPT: Creation of a graph based on a user selection variable</title>
      <link>https://community.jmp.com/t5/Discussions/JMP-SCRIPT-Creation-of-a-graph-based-on-a-user-selection/m-p/611748#M81205</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="pmroz_0-1678800356858.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/51001i69633C04526ACBA7/image-size/medium?v=v2&amp;amp;px=400" role="button" title="pmroz_0-1678800356858.png" alt="pmroz_0-1678800356858.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Mar 2023 13:26:04 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JMP-SCRIPT-Creation-of-a-graph-based-on-a-user-selection/m-p/611748#M81205</guid>
      <dc:creator>pmroz</dc:creator>
      <dc:date>2023-03-14T13:26:04Z</dc:date>
    </item>
    <item>
      <title>Re: JMP SCRIPT: Creation of a graph based on a user selection variable</title>
      <link>https://community.jmp.com/t5/Discussions/JMP-SCRIPT-Creation-of-a-graph-based-on-a-user-selection/m-p/615906#M81564</link>
      <description>&lt;P&gt;Great ! this is exactly what I need.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now, I want to make a column selection based on the y_column to delete columns not desired by the user:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;a = {Eval(y_colums)};
	limit_table &amp;lt;&amp;lt; Invert Column Selection( a );
	limit_table &amp;lt;&amp;lt; Delete Columns;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;However, it does not work.&lt;/P&gt;&lt;P&gt;Do you have any idea to help me?&lt;/P&gt;&lt;P&gt;thank you&lt;/P&gt;&lt;P&gt;sebastien&lt;/P&gt;</description>
      <pubDate>Thu, 23 Mar 2023 15:43:21 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JMP-SCRIPT-Creation-of-a-graph-based-on-a-user-selection/m-p/615906#M81564</guid>
      <dc:creator>Sebastienlg</dc:creator>
      <dc:date>2023-03-23T15:43:21Z</dc:date>
    </item>
  </channel>
</rss>

