<?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: How to use Filter Change Handler to work with Page option in Graph Builder? in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/How-to-use-Filter-Change-Handler-to-work-with-Page-option-in/m-p/722466#M90482</link>
    <description>&lt;P&gt;You could just try what it does when you send it to a data filter.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is example from JMP17 scripting index&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Cities.jmp");
obj = dt &amp;lt;&amp;lt; Data Filter(
	Add Filter(columns(:Region, :POP), where(:Region == {"C", "N"})),
	Mode(Select(0), Show(0), Include(1))
);
obj &amp;lt;&amp;lt; Get Filtered Rows; // [1, 4, 5, 6, 7, 19, 20, 26, 36, 40, 42, 46]&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 07 Feb 2024 14:04:49 GMT</pubDate>
    <dc:creator>jthi</dc:creator>
    <dc:date>2024-02-07T14:04:49Z</dc:date>
    <item>
      <title>How to use Filter Change Handler to work with Page option in Graph Builder?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-use-Filter-Change-Handler-to-work-with-Page-option-in/m-p/721233#M90317</link>
      <description>&lt;P&gt;Attached is an example data table. The script below tries to plot each parameter selected via the Local Data Filter in a new "Page" in Graph Builder. As it stands, the y-axis title is shown as "Median" every time a new "Parameter" is selected via the Local Data Filter.&lt;/P&gt;&lt;P&gt;I would like the Parameter name to be the y-axis title when new a parameter gets selected and plotted on a new "Page".&lt;/P&gt;&lt;P&gt;I tried using the filter change handler for this, but my script does not quite work. I think I need the index &lt;EM&gt;i&amp;nbsp;&lt;/EM&gt;below to be updated each time a new parameter is selected or may be there is another way. Any direction will be useful.&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;XPath( "//TextEditBox" ))[i]&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;here is my script&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here (1);
Clear Log ();
gb = Graph Builder(
	Size( 531, 325 ),
	Show Control Panel( 0 ),
	Variables( X( :PartID ), Y( :Median ), Page( :Parameter ), Color( :TestStage ) ),
	Elements( Points( X, Y, Legend( 34 ) ) ),
	Local Data Filter(
		Conditional,
		Add Filter(
			columns( :TestStage, :Parameter ),
			Where( :TestStage == {"A", "B"} ),
			Where( :Parameter == {"BKDVoltage", "Capacitance"} )
		)
	),
	SendToReport( Dispatch( {}, "graph title", TextEditBox, {Set Text( "myTitleGoesHere" )} ) )
);

ldf = Current Report()["Local Data Filter"] &amp;lt;&amp;lt; get scriptable object;

changeTitle = Function( {this},
	print(this);
  	ldfText = Regex(ldf &amp;lt;&amp;lt; get where clause(),"\(?\s*(:Parameter == .*?)\)","\1");
	if(ismissing(ldfText),ldfText = " Selected Test Parameter ");
	(Report( gb ) &amp;lt;&amp;lt; XPath( "//TextEditBox" ))[6] &amp;lt;&amp;lt; Set Text(ldfText);
);

fsh = ldf &amp;lt;&amp;lt; Make Filter Change Handler(changeTitle());&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 01 Feb 2024 13:32:50 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-use-Filter-Change-Handler-to-work-with-Page-option-in/m-p/721233#M90317</guid>
      <dc:creator>Neo</dc:creator>
      <dc:date>2024-02-01T13:32:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to use Filter Change Handler to work with Page option in Graph Builder?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-use-Filter-Change-Handler-to-work-with-Page-option-in/m-p/721263#M90320</link>
      <description>&lt;P&gt;You could try to make your XPath query more accurate (explore the XML and property tree). Something like this might work&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Report(gb) &amp;lt;&amp;lt; XPath("//GraphBuilderTitleBox/TextEditBox[text()='Median']")&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 01 Feb 2024 14:05:37 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-use-Filter-Change-Handler-to-work-with-Page-option-in/m-p/721263#M90320</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2024-02-01T14:05:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to use Filter Change Handler to work with Page option in Graph Builder?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-use-Filter-Change-Handler-to-work-with-Page-option-in/m-p/721275#M90322</link>
      <description>&lt;P&gt;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/14366"&gt;@jthi&lt;/a&gt;&amp;nbsp;This partly works, but all selected &lt;EM&gt;Parameters&lt;/EM&gt; are appearing as Y-axis title in all the plotted charts under each other.&lt;/P&gt;&lt;P&gt;I changed&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;(Report( gb ) &amp;lt;&amp;lt; XPath( "//TextEditBox" ))[6] &amp;lt;&amp;lt; Set Text(ldfText);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;to&amp;nbsp;&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;(Report(gb) &amp;lt;&amp;lt; XPath("//GraphBuilderTitleBox/TextEditBox[text()='Median']")) &amp;lt;&amp;lt; Set Text(ldfText);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;and get&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="Neo_1-1706797579178.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/60797i5A1B18128BBFE9B5/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Neo_1-1706797579178.png" alt="Neo_1-1706797579178.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Need only the plotted Parameter name as Y-axis title on each chart.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Feb 2024 14:27:28 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-use-Filter-Change-Handler-to-work-with-Page-option-in/m-p/721275#M90322</guid>
      <dc:creator>Neo</dc:creator>
      <dc:date>2024-02-01T14:27:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to use Filter Change Handler to work with Page option in Graph Builder?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-use-Filter-Change-Handler-to-work-with-Page-option-in/m-p/721278#M90324</link>
      <description>&lt;P&gt;One option would be to parse the get where clause&lt;/P&gt;
&lt;LI-CODE lang="jsl"&gt;  	ldfText = Regex(ldf &amp;lt;&amp;lt; get where clause(),"\(?\s*(:Parameter == .*?)\)","\1");&lt;/LI-CODE&gt;
&lt;P&gt;into separate items and loop over those and set the titles in the loop.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Edit:&lt;/P&gt;
&lt;P&gt;This will require a bit modification also to the part where you get references to text edit boxes for y-axis. Below is one option which might work&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here (1);
dt = Open("$DOWNLOADS/exampleSummaryTable.jmp");

gb = dt &amp;lt;&amp;lt; Graph Builder(
	Size( 531, 325 ),
	Show Control Panel( 0 ),
	Variables( X( :PartID ), Y( :Median ), Page( :Parameter ), Color( :TestStage ) ),
	Elements( Points( X, Y, Legend( 34 ) ) ),
	Local Data Filter(
		Conditional,
		Add Filter(
			columns( :TestStage, :Parameter ),
			Where( :TestStage == {"A", "B"} ),
			Where( :Parameter == {"BKDVoltage", "Capacitance"} )
		)
	),
	SendToReport( Dispatch( {}, "graph title", TextEditBox, {Set Text( "myTitleGoesHere" )} ) )
);

update_title = Function( {this},
  	param_where = Regex(local_filter &amp;lt;&amp;lt; get where clause(),"\(?\s*(:Parameter == .*?)\)","\1");
  	param_where_list = Words(param_where, "|");
  	
	tebs = Report(gb) &amp;lt;&amp;lt; XPath("//GraphBuilderTitleBox/TextEditBox");
	y_tebs= tebs[4::N Items(tebs)::2];

	If(N Items(y_tebs) != N Items(param_where_list),
		return(); // some problem
	);
  	For Each({where_str, idx}, param_where_list,
  		title = Trim Whitespace(Word(-1, where_str, "="));
  		Substitute Into(title, "\!"", "");
		y_tebs[idx] &amp;lt;&amp;lt; Set Text(title);
  	);
	
);


local_filter = Current Report()["Local Data Filter"] &amp;lt;&amp;lt; get scriptable object;

filter_handler = local_filter &amp;lt;&amp;lt; Make Filter Change Handler(update_title());
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 01 Feb 2024 14:55:15 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-use-Filter-Change-Handler-to-work-with-Page-option-in/m-p/721278#M90324</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2024-02-01T14:55:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to use Filter Change Handler to work with Page option in Graph Builder?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-use-Filter-Change-Handler-to-work-with-Page-option-in/m-p/721285#M90329</link>
      <description>&lt;P&gt;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/14366"&gt;@jthi&lt;/a&gt;&amp;nbsp;This works except the initial chart (before filter change handler kids in) still has Median as y-axis title. Any way to fix this?&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Neo_0-1706800220954.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/60800i300DCE6B3CF938A6/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Neo_0-1706800220954.png" alt="Neo_0-1706800220954.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Feb 2024 15:10:37 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-use-Filter-Change-Handler-to-work-with-Page-option-in/m-p/721285#M90329</guid>
      <dc:creator>Neo</dc:creator>
      <dc:date>2024-02-01T15:10:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to use Filter Change Handler to work with Page option in Graph Builder?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-use-Filter-Change-Handler-to-work-with-Page-option-in/m-p/721287#M90330</link>
      <description>&lt;P&gt;Trigger the function once before you create the filter change handler&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;update_title(local_filter);&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-1706800507842.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/60801i56BA7120FD8045A2/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jthi_0-1706800507842.png" alt="jthi_0-1706800507842.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Feb 2024 15:15:14 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-use-Filter-Change-Handler-to-work-with-Page-option-in/m-p/721287#M90330</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2024-02-01T15:15:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to use Filter Change Handler to work with Page option in Graph Builder?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-use-Filter-Change-Handler-to-work-with-Page-option-in/m-p/721325#M90336</link>
      <description>&lt;P&gt;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/14366"&gt;@jthi&lt;/a&gt;&amp;nbsp;Ok. Noted the trigger. The script does not work if I have an underscore in my Parameter name (I have got few underscores in the parameters names in my actual data). Example data table attached with underscore in Parameter name. The script below throws an error on the &lt;EM&gt;Words&lt;/EM&gt; function with the attached data table.&lt;/P&gt;&lt;P&gt;Also had to comment the &lt;EM&gt;Size()&amp;nbsp;&lt;/EM&gt;without which the initial charts looked strange.&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here (1);
clear log ();
dt = Current Data Table();
gb = dt &amp;lt;&amp;lt; Graph Builder(
	//Size( 531, 525 ),
	Show Control Panel( 0 ),
	Variables( X( :PartID ), Y( :Median ), Page( :Parameter ), Color( :TestStage ) ),
	Elements( Points( X, Y, Legend( 34 ) ) ),
	Local Data Filter(
		Conditional,
		Add Filter(
			columns( :TestStage, :Parameter ),
			Where( :TestStage == {"A", "B"} ),
			Where( :Parameter == {"BKDVoltage_1", "Capacitance_1"} )
		)
	),
	SendToReport( Dispatch( {}, "graph title", TextEditBox, {Set Text( "myTitleGoesHere" )} ) )
);

update_title = Function( {this},
  	param_where = Regex(local_filter &amp;lt;&amp;lt; get where clause(),"\(?\s*(:Parameter == .*?)\)","\1");
  	param_where_list = Words(param_where, "|");
  	
	tebs = Report(gb) &amp;lt;&amp;lt; XPath("//GraphBuilderTitleBox/TextEditBox");
	y_tebs= tebs[4::N Items(tebs)::2];

	If(N Items(y_tebs) != N Items(param_where_list),
		return(); 
	);
  	For Each({where_str, idx}, param_where_list,
  		title = Trim Whitespace(Word(-1, where_str, "="));
  		Substitute Into(title, "\!"", "");
		y_tebs[idx] &amp;lt;&amp;lt; Set Text(title);
  	);
	
);

local_filter = Current Report()["Local Data Filter"] &amp;lt;&amp;lt; get scriptable object;
update_title(local_filter);
filter_handler = local_filter &amp;lt;&amp;lt; Make Filter Change Handler(update_title());&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 01 Feb 2024 16:26:49 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-use-Filter-Change-Handler-to-work-with-Page-option-in/m-p/721325#M90336</guid>
      <dc:creator>Neo</dc:creator>
      <dc:date>2024-02-01T16:26:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to use Filter Change Handler to work with Page option in Graph Builder?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-use-Filter-Change-Handler-to-work-with-Page-option-in/m-p/721340#M90339</link>
      <description>&lt;P&gt;Issue is most likely that you have Multiple Response column as you Parameter&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jthi_0-1706806005807.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/60813iBA96AE539A7E4045/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jthi_0-1706806005807.png" alt="jthi_0-1706806005807.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jthi_1-1706806020681.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/60814i09B8B1BFAA510221/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jthi_1-1706806020681.png" alt="jthi_1-1706806020681.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Feb 2024 16:47:08 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-use-Filter-Change-Handler-to-work-with-Page-option-in/m-p/721340#M90339</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2024-02-01T16:47:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to use Filter Change Handler to work with Page option in Graph Builder?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-use-Filter-Change-Handler-to-work-with-Page-option-in/m-p/721354#M90342</link>
      <description>&lt;P&gt;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/14366"&gt;@jthi&lt;/a&gt;&amp;nbsp;Thanks, Removing &lt;EM&gt;Multiple Response&lt;/EM&gt; from Parameter properties does make the script work for the example data (exampleSummaryTable2). But I am still having problems with my actual data set where there are no columns with Multiple Response set (unfortunately cannot share actual data). What else could it be?&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Neo_0-1706807048204.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/60815i1CFF045F1F0C55CE/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Neo_0-1706807048204.png" alt="Neo_0-1706807048204.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I can also reproduce this same error if I use comment out this in the script&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;//Where( :Parameter == {"BKDVoltage_1", "Capacitance_1"}&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;as in&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here (1);
clear log ();
dt = Current Data Table();
gb = dt &amp;lt;&amp;lt; Graph Builder(
	Size( 531, 525 ),
	Show Control Panel( 0 ),
	Variables( X( :PartID ), Y( :Median ), Page( :Parameter ), Color( :TestStage ) ),
	Elements( Points( X, Y, Legend( 34 ) ) ),
	Local Data Filter(
		Conditional,
		Add Filter(
			columns( :TestStage, :Parameter ),
			Where( :TestStage == {"A", "B"} ),
			//Where( :Parameter == {"BKDVoltage_1", "Capacitance_1"} )
		)
	),
	SendToReport( Dispatch( {}, "graph title", TextEditBox, {Set Text( "myTitleGoesHere" )} ) )
);

update_title = Function( {this},
  	param_where = Regex(local_filter &amp;lt;&amp;lt; get where clause(),"\(?\s*(:Parameter == .*?)\)","\1");
  	param_where_list = Words(param_where, "|");
  	
	tebs = Report(gb) &amp;lt;&amp;lt; XPath("//GraphBuilderTitleBox/TextEditBox");
	y_tebs= tebs[4::N Items(tebs)::2]; //show (y_tebs);

	If(N Items(y_tebs) != N Items(param_where_list),
		return(); 
	);
  	For Each({where_str, idx}, param_where_list,
  		title = Trim Whitespace(Word(-1, where_str, "="));
  		Substitute Into(title, "\!"", "");
		y_tebs[idx] &amp;lt;&amp;lt; Set Text(title);
  	);
	
);

local_filter = Current Report()["Local Data Filter"] &amp;lt;&amp;lt; get scriptable object;
update_title(local_filter);
filter_handler = local_filter &amp;lt;&amp;lt; Make Filter Change Handler(update_title());&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;In my actual data case, I do not have the luxury to pre-select one or more parameters via the Local Data Filter. Perhaps this is what is causing the issue in the actual data case. Any way to get around this?&lt;/P&gt;</description>
      <pubDate>Thu, 01 Feb 2024 17:12:07 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-use-Filter-Change-Handler-to-work-with-Page-option-in/m-p/721354#M90342</guid>
      <dc:creator>Neo</dc:creator>
      <dc:date>2024-02-01T17:12:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to use Filter Change Handler to work with Page option in Graph Builder?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-use-Filter-Change-Handler-to-work-with-Page-option-in/m-p/721356#M90344</link>
      <description>&lt;P&gt;This isn't returning what it is supposed to&lt;/P&gt;
&lt;PRE class="language-jsl"&gt;&lt;CODE&gt;  	param_where = Regex(local_filter &amp;lt;&amp;lt; get where clause(),"\(?\s*(:Parameter == .*?)\)","\1");&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;One reason could be that you have no values selected in local data filter. You could add additional check for missing values and if param_where is missing, return early from the function without doing nothing (or rather then you have all values as parameters and you have to get the parameter values some other way)&lt;/P&gt;</description>
      <pubDate>Thu, 01 Feb 2024 17:13:09 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-use-Filter-Change-Handler-to-work-with-Page-option-in/m-p/721356#M90344</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2024-02-01T17:13:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to use Filter Change Handler to work with Page option in Graph Builder?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-use-Filter-Change-Handler-to-work-with-Page-option-in/m-p/721357#M90345</link>
      <description>&lt;P&gt;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/14366"&gt;@jthi&lt;/a&gt;&amp;nbsp;In the actual data case, if I comment out&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;update_title(local_filter);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;as in&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;local_filter = Current Report()["Local Data Filter"] &amp;lt;&amp;lt; get scriptable object;
//update_title(local_filter);
filter_handler = local_filter &amp;lt;&amp;lt; Make Filter Change Handler(update_title());&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Everything works as expected except the initial charts do not have the correct Y Axis title. Y axis title becomes correct only after another TestStage is selected. Is my placement of&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;update_title(local_filter);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;correct or should it be placed somewhere else?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Feb 2024 17:35:17 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-use-Filter-Change-Handler-to-work-with-Page-option-in/m-p/721357#M90345</guid>
      <dc:creator>Neo</dc:creator>
      <dc:date>2024-02-01T17:35:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to use Filter Change Handler to work with Page option in Graph Builder?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-use-Filter-Change-Handler-to-work-with-Page-option-in/m-p/721359#M90346</link>
      <description>&lt;P&gt;Like I said, it is most likely due to parameters being filtered&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here (1);
dt = Open("$DOWNLOADS/exampleSummaryTable.jmp");

gb = dt &amp;lt;&amp;lt; Graph Builder(
	Size( 531, 325 ),
	Show Control Panel( 0 ),
	Variables( X( :PartID ), Y( :Median ), Page( :Parameter ), Color( :TestStage ) ),
	Elements( Points( X, Y, Legend( 34 ) ) ),
	Local Data Filter(
		Conditional,
		Add Filter(
			columns( :TestStage, :Parameter ),
			Where( :TestStage == {"A", "B"} ),
			Where( :Parameter == {"BKDVoltage", "Capacitance"} )
		)
	),
	SendToReport( Dispatch( {}, "graph title", TextEditBox, {Set Text( "myTitleGoesHere" )} ) )
);

Summarize(dt, uniq_params = By(:Parameter));

update_title = Function( {this},
  	param_where = Regex(local_filter &amp;lt;&amp;lt; get where clause(),"\(?\s*(:Parameter == .*?)\)","\1");
  	If(Is Missing(param_where),
		param_list = uniq_params;
  	,
		param_where_list = Words(param_where, "|");
		param_list = Transform Each({where_str}, param_where_list,
			title = Trim Whitespace(Word(-1, where_str, "="));
			Substitute(title, "\!"", "");		
		);
  	);
  	
	tebs = Report(gb) &amp;lt;&amp;lt; XPath("//GraphBuilderTitleBox/TextEditBox");
	y_tebs= tebs[4::N Items(tebs)::2]; // skip title, subtitle and xaxis?
	
	If(N Items(y_tebs) != N Items(param_list),
		return(0); // some problem
	);
	
	gb &amp;lt;&amp;lt; inval;
  	For Each({param_val, idx}, param_list,
  		y_tebs[idx] &amp;lt;&amp;lt; Set Text(param_val);
  	);
  	gb &amp;lt;&amp;lt; update window;
  	
  	return(1);
);


local_filter = Current Report()["Local Data Filter"] &amp;lt;&amp;lt; get scriptable object;
update_title(local_filter);
filter_handler = local_filter &amp;lt;&amp;lt; Make Filter Change Handler(update_title());
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 01 Feb 2024 17:58:07 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-use-Filter-Change-Handler-to-work-with-Page-option-in/m-p/721359#M90346</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2024-02-01T17:58:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to use Filter Change Handler to work with Page option in Graph Builder?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-use-Filter-Change-Handler-to-work-with-Page-option-in/m-p/721559#M90363</link>
      <description>&lt;P&gt;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/14366"&gt;@jthi&lt;/a&gt;&amp;nbsp;Thanks. This runs without error in the case of my actual data set but the initial plots are still without the correct parameter names on the y-axis. The correct y-axis titles are trigged only when I select a second TestStage (initially only one is selected via the script).&lt;/P&gt;</description>
      <pubDate>Mon, 05 Feb 2024 12:14:34 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-use-Filter-Change-Handler-to-work-with-Page-option-in/m-p/721559#M90363</guid>
      <dc:creator>Neo</dc:creator>
      <dc:date>2024-02-05T12:14:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to use Filter Change Handler to work with Page option in Graph Builder?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-use-Filter-Change-Handler-to-work-with-Page-option-in/m-p/721584#M90364</link>
      <description>&lt;P&gt;Not sure what could be wrong as it seems to work with the original data and with the data2 after removing multiple response just fine (using JMP17.2). Does it work if you select one value and then remove all selections from your filter?&lt;/P&gt;
&lt;LI-SPOILER&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);
dt = Current Data Table();

gb = dt &amp;lt;&amp;lt; Graph Builder(
	Show Control Panel(0),
	Variables(X(:PartID), Y(:Median), Page(:Parameter), Color(:TestStage)),
	Elements(Points(X, Y, Legend(34))),
	Local Data Filter(
		Conditional,
		Add Filter(
			columns(:TestStage, :Parameter),
			Where(:TestStage == {"A", "B"})
		)
	),
	SendToReport(Dispatch({}, "graph title", TextEditBox, {Set Text("myTitleGoesHere")}))
);

Summarize(dt, uniq_params = By(:Parameter));

update_title = Function({this},
	param_where = Regex(local_filter &amp;lt;&amp;lt; get where clause(), "\(?\s*(:Parameter == .*?)\)", "\1");
	If(Is Missing(param_where),
		param_list = uniq_params,
		param_where_list = Words(param_where, "|");
		param_list = Transform Each({where_str}, param_where_list,
			title = Trim Whitespace(Word(-1, where_str, "="));
			Substitute(title, "\!"", "");
		);
	);
  	
	tebs = Report(gb) &amp;lt;&amp;lt; XPath("//GraphBuilderTitleBox/TextEditBox");
	y_tebs = tebs[4 :: N Items(tebs) :: 2]; // skip title, subtitle and xaxis?
	
	If(N Items(y_tebs) != N Items(param_list),
		Return(0); // some problem
	);
	
	gb &amp;lt;&amp;lt; inval;
	For Each({param_val, idx}, param_list, y_tebs[idx] &amp;lt;&amp;lt; Set Text(param_val));
	gb &amp;lt;&amp;lt; update window;
  	
	Return(1);
);


local_filter = Current Report()["Local Data Filter"] &amp;lt;&amp;lt; get scriptable object;
update_title(local_filter);
filter_handler = local_filter &amp;lt;&amp;lt; Make Filter Change Handler(update_title());&lt;/CODE&gt;&lt;/PRE&gt;
&lt;/LI-SPOILER&gt;</description>
      <pubDate>Fri, 02 Feb 2024 15:03:58 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-use-Filter-Change-Handler-to-work-with-Page-option-in/m-p/721584#M90364</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2024-02-02T15:03:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to use Filter Change Handler to work with Page option in Graph Builder?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-use-Filter-Change-Handler-to-work-with-Page-option-in/m-p/722132#M90405</link>
      <description>&lt;P&gt;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/14366"&gt;@jthi&lt;/a&gt;&amp;nbsp;I do not understand what you mean by&amp;nbsp;&lt;SPAN&gt;"Does it work if you select one value and then remove all selections from your filter?". Could you please rephrase? Also, I am on JMP 16.2.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 05 Feb 2024 16:19:43 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-use-Filter-Change-Handler-to-work-with-Page-option-in/m-p/722132#M90405</guid>
      <dc:creator>Neo</dc:creator>
      <dc:date>2024-02-05T16:19:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to use Filter Change Handler to work with Page option in Graph Builder?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-use-Filter-Change-Handler-to-work-with-Page-option-in/m-p/722135#M90406</link>
      <description>&lt;P&gt;Using exampleSummarTable.jmp and latest script I provided.&lt;/P&gt;
&lt;P&gt;After one value has been filtered&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jthi_0-1707150114044.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/60862iED2E81219048DF47/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jthi_0-1707150114044.png" alt="jthi_0-1707150114044.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Deselect that single value (so nothing is being filtered)&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jthi_1-1707150128777.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/60863i14D5435F263F401A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jthi_1-1707150128777.png" alt="jthi_1-1707150128777.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 05 Feb 2024 16:22:22 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-use-Filter-Change-Handler-to-work-with-Page-option-in/m-p/722135#M90406</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2024-02-05T16:22:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to use Filter Change Handler to work with Page option in Graph Builder?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-use-Filter-Change-Handler-to-work-with-Page-option-in/m-p/722419#M90475</link>
      <description>&lt;P&gt;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/14366"&gt;@jthi&lt;/a&gt;&amp;nbsp;In the example cases so far everything works as expected and matches what you see.&lt;/P&gt;&lt;P&gt;However, I was able to reproduce part of the issue I am facing with my actual data by creating another data table which more closely matches with my actual data. Data table is attached and using the script below&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);
dt = Current Data Table();

gb = dt &amp;lt;&amp;lt; Graph Builder(
    Size( 571, 174 ),
	Show Control Panel(0),
	Variables(X(:PartID), Y(:Median), Page(:Parameter), Color(:TestStage)),
	Elements(Points(X, Y, Legend(34))),
	Local Data Filter(
		Conditional,
		Add Filter(
			columns(:TestDate, :Has Limits?, :TestStage, :Parameter ),
			Where( :Has Limits? == "Yes" ),
			Where( :TestStage == "STG5" ),
		)
	),
	SendToReport(Dispatch({}, "graph title", TextEditBox, {Set Text("myTitleGoesHere")}))
);

Summarize(dt, uniq_params = By(:Parameter));

update_title = Function({this},
	param_where = Regex(local_filter &amp;lt;&amp;lt; get where clause(), "\(?\s*(:Parameter == .*?)\)", "\1");
	If(Is Missing(param_where),
		param_list = uniq_params,
		param_where_list = Words(param_where, "|");
		param_list = Transform Each({where_str}, param_where_list,
			title = Trim Whitespace(Word(-1, where_str, "="));
			Substitute(title, "\!"", "");
		);
	);
  	
	tebs = Report(gb) &amp;lt;&amp;lt; XPath("//GraphBuilderTitleBox/TextEditBox");
	y_tebs = tebs[4 :: N Items(tebs) :: 2]; // skip title, subtitle and xaxis?
	
	If(N Items(y_tebs) != N Items(param_list),
		Return(0); // some problem
	);
	
	gb &amp;lt;&amp;lt; inval;
	For Each({param_val, idx}, param_list, y_tebs[idx] &amp;lt;&amp;lt; Set Text(param_val));
	gb &amp;lt;&amp;lt; update window;
  	
	Return(1);
);


local_filter = Current Report()["Local Data Filter"] &amp;lt;&amp;lt; get scriptable object;
update_title(local_filter);
filter_handler = local_filter &amp;lt;&amp;lt; Make Filter Change Handler(update_title());&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I get the following when no Parameters are selected,&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Neo_0-1707308734378.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/60965iCDE6B91F682F988B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Neo_0-1707308734378.png" alt="Neo_0-1707308734378.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;and this one after selecting all Parameters and unselecting them again. Here the top chart only gets the correct y-axis label.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Neo_1-1707308798896.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/60966i65652D72075BEC86/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Neo_1-1707308798896.png" alt="Neo_1-1707308798896.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Hopefully if these get resolved, my actual data case will start working as expected as well. Any direction would be very useful.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Feb 2024 12:40:35 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-use-Filter-Change-Handler-to-work-with-Page-option-in/m-p/722419#M90475</guid>
      <dc:creator>Neo</dc:creator>
      <dc:date>2024-02-07T12:40:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to use Filter Change Handler to work with Page option in Graph Builder?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-use-Filter-Change-Handler-to-work-with-Page-option-in/m-p/722423#M90477</link>
      <description>&lt;P&gt;This check is causing the issues.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jthi_0-1707310903516.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/60967i172032DA5F692F38/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jthi_0-1707310903516.png" alt="jthi_0-1707310903516.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;There are more filters which can cause a situation when not all parameters are visible. One option would be to use &amp;lt;&amp;lt; Get Filtered Rows and calculate which parameters are visible instead of just assuming all of them are.&lt;/P&gt;</description>
      <pubDate>Wed, 07 Feb 2024 13:03:13 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-use-Filter-Change-Handler-to-work-with-Page-option-in/m-p/722423#M90477</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2024-02-07T13:03:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to use Filter Change Handler to work with Page option in Graph Builder?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-use-Filter-Change-Handler-to-work-with-Page-option-in/m-p/722463#M90480</link>
      <description>&lt;P&gt;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/14366"&gt;@jthi&lt;/a&gt;&amp;nbsp;Thanks but my Scripting Index (JMP 16.2) does got give any example on how to use &amp;lt;&amp;lt; Get Filtered Rows.&lt;/P&gt;&lt;P&gt;Could I get some help on how to use it in my case?&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Neo_0-1707314128854.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/60968iBBB9A8A1FFF8DBD8/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Neo_0-1707314128854.png" alt="Neo_0-1707314128854.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Feb 2024 13:56:40 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-use-Filter-Change-Handler-to-work-with-Page-option-in/m-p/722463#M90480</guid>
      <dc:creator>Neo</dc:creator>
      <dc:date>2024-02-07T13:56:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to use Filter Change Handler to work with Page option in Graph Builder?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-use-Filter-Change-Handler-to-work-with-Page-option-in/m-p/722466#M90482</link>
      <description>&lt;P&gt;You could just try what it does when you send it to a data filter.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is example from JMP17 scripting index&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Cities.jmp");
obj = dt &amp;lt;&amp;lt; Data Filter(
	Add Filter(columns(:Region, :POP), where(:Region == {"C", "N"})),
	Mode(Select(0), Show(0), Include(1))
);
obj &amp;lt;&amp;lt; Get Filtered Rows; // [1, 4, 5, 6, 7, 19, 20, 26, 36, 40, 42, 46]&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 07 Feb 2024 14:04:49 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-use-Filter-Change-Handler-to-work-with-Page-option-in/m-p/722466#M90482</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2024-02-07T14:04:49Z</dc:date>
    </item>
  </channel>
</rss>

