<?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: Get display box reference for selected item in report in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Get-display-box-reference-for-selected-item-in-report/m-p/892597#M105363</link>
    <description>&lt;P&gt;I have made XML/Report layer viewer which lets user pick elements and I use XPath with it. First use Get XML to get an idea what is possible&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jthi_0-1754456992795.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/79711iB61AB2DFDD6B0F45/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jthi_0-1754456992795.png" alt="jthi_0-1754456992795.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;So we are looking for selected attribute with value of true and then it is just figuring out the query.&lt;/P&gt;
&lt;LI-SPOILER&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1); 

dt = Open("$SAMPLE_DATA/Big Class.jmp");
biv = dt &amp;lt;&amp;lt; Run Script("Bivariate");

rep = Report(biv);


s = rep &amp;lt;&amp;lt; XPath("//*[@selected='true']");

If(N Items(s) &amp;gt; 0,
	ref = s[1];
,
	ref = Empty();
);

sub_path = ref &amp;lt;&amp;lt; Get Display Path(rep,  Mode("Subscript"));
// biv["Bivariate Fit of weight By height", "Linear Fit", "Summary of Fit", String Col Box(1)]&lt;/CODE&gt;&lt;/PRE&gt;
&lt;/LI-SPOILER&gt;
&lt;P&gt;I would still suggest using Show Properties like Jim did demonstrate for basic use cases.&lt;/P&gt;</description>
    <pubDate>Wed, 06 Aug 2025 05:14:45 GMT</pubDate>
    <dc:creator>jthi</dc:creator>
    <dc:date>2025-08-06T05:14:45Z</dc:date>
    <item>
      <title>Get display box reference for selected item in report</title>
      <link>https://community.jmp.com/t5/Discussions/Get-display-box-reference-for-selected-item-in-report/m-p/892539#M105355</link>
      <description>&lt;P&gt;I would like to use JSL to get a reference to a selected report element. &amp;nbsp;More specifically. &amp;nbsp;I want&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;a) run a report&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MathStatChem_0-1754425955232.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/79693iB23015D5F6B5D783/image-size/medium?v=v2&amp;amp;px=400" role="button" title="MathStatChem_0-1754425955232.png" alt="MathStatChem_0-1754425955232.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;b) manually select a report element&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MathStatChem_1-1754426045135.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/79694iAC70D9146DA1CFAF/image-size/medium?v=v2&amp;amp;px=400" role="button" title="MathStatChem_1-1754426045135.png" alt="MathStatChem_1-1754426045135.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;c) then run a JSL command to get the display box path to that selected report element.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any ideas on how to do this? &amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 05 Aug 2025 20:35:02 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Get-display-box-reference-for-selected-item-in-report/m-p/892539#M105355</guid>
      <dc:creator>MathStatChem</dc:creator>
      <dc:date>2025-08-05T20:35:02Z</dc:date>
    </item>
    <item>
      <title>Re: Get display box reference for selected item in report</title>
      <link>https://community.jmp.com/t5/Discussions/Get-display-box-reference-for-selected-item-in-report/m-p/892551#M105357</link>
      <description>&lt;P&gt;You can do this by right clicking on the report and selecting&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;Show Properties&lt;/P&gt;
&lt;P&gt;and then click on the display item you want to get the path to&lt;/P&gt;
&lt;P&gt;and under the Box Path you will find the path to the element you have selected&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="txnelson_0-1754430051303.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/79695i8AFC92748CEB2766/image-size/medium?v=v2&amp;amp;px=400" role="button" title="txnelson_0-1754430051303.png" alt="txnelson_0-1754430051303.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 05 Aug 2025 21:41:00 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Get-display-box-reference-for-selected-item-in-report/m-p/892551#M105357</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2025-08-05T21:41:00Z</dc:date>
    </item>
    <item>
      <title>Re: Get display box reference for selected item in report</title>
      <link>https://community.jmp.com/t5/Discussions/Get-display-box-reference-for-selected-item-in-report/m-p/892597#M105363</link>
      <description>&lt;P&gt;I have made XML/Report layer viewer which lets user pick elements and I use XPath with it. First use Get XML to get an idea what is possible&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jthi_0-1754456992795.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/79711iB61AB2DFDD6B0F45/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jthi_0-1754456992795.png" alt="jthi_0-1754456992795.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;So we are looking for selected attribute with value of true and then it is just figuring out the query.&lt;/P&gt;
&lt;LI-SPOILER&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1); 

dt = Open("$SAMPLE_DATA/Big Class.jmp");
biv = dt &amp;lt;&amp;lt; Run Script("Bivariate");

rep = Report(biv);


s = rep &amp;lt;&amp;lt; XPath("//*[@selected='true']");

If(N Items(s) &amp;gt; 0,
	ref = s[1];
,
	ref = Empty();
);

sub_path = ref &amp;lt;&amp;lt; Get Display Path(rep,  Mode("Subscript"));
// biv["Bivariate Fit of weight By height", "Linear Fit", "Summary of Fit", String Col Box(1)]&lt;/CODE&gt;&lt;/PRE&gt;
&lt;/LI-SPOILER&gt;
&lt;P&gt;I would still suggest using Show Properties like Jim did demonstrate for basic use cases.&lt;/P&gt;</description>
      <pubDate>Wed, 06 Aug 2025 05:14:45 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Get-display-box-reference-for-selected-item-in-report/m-p/892597#M105363</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2025-08-06T05:14:45Z</dc:date>
    </item>
    <item>
      <title>Re: Get display box reference for selected item in report</title>
      <link>https://community.jmp.com/t5/Discussions/Get-display-box-reference-for-selected-item-in-report/m-p/892705#M105382</link>
      <description>&lt;P&gt;Exactly what I needed! &amp;nbsp;Thanks. &amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Aug 2025 14:49:10 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Get-display-box-reference-for-selected-item-in-report/m-p/892705#M105382</guid>
      <dc:creator>MathStatChem</dc:creator>
      <dc:date>2025-08-06T14:49:10Z</dc:date>
    </item>
  </channel>
</rss>

