<?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 Get Selected Outline Box Values in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Get-Selected-Outline-Box-Values/m-p/847193#M102182</link>
    <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a window with a hierarchy of outline boxes.&amp;nbsp; I would like the user to select some boxes, and then retrieve the hierarchy with JSL.&amp;nbsp; Is this possible?&amp;nbsp; I only have 1 layer in my example&amp;nbsp;hierarchy.&amp;nbsp; Ideally, this will work for a many-layered&amp;nbsp;hierarchy.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;but ultimately I would like several layers.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am using JMP 18.1.2.&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 );

cary = Associative Array();
cary["state"] = "NC";
cary["population"] = 116234;
cary["weather"] = "cloudy";
cary["population"] += 10;
cary["weather"] = "sunny";
cary["high schools"] = {"Cary", "Green Hope", "Panther Creek"};

Print( cary );

add_outline = Function( {target, input},
	{Default Local},
	Try(
		If( Type( input ) == "Associative Array",
			For Each( {key, index}, input &amp;lt;&amp;lt; Get Keys,
				target &amp;lt;&amp;lt; Append( Outline Box( key ) );
				add_outline( target[key], input[key] );
			)
		,
			target &amp;lt;&amp;lt; Append( Text Box( input ) )
		)
	,
		target &amp;lt;&amp;lt; Append( Text Box( "null" ) )
	)
);

win = New Window( "Cary Window" );
add_outline( win, cary );

// User will select some values.

win &amp;lt;&amp;lt; Get Selected; // How to get selected values?&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 11 Mar 2025 00:29:17 GMT</pubDate>
    <dc:creator>robot</dc:creator>
    <dc:date>2025-03-11T00:29:17Z</dc:date>
    <item>
      <title>Get Selected Outline Box Values</title>
      <link>https://community.jmp.com/t5/Discussions/Get-Selected-Outline-Box-Values/m-p/847193#M102182</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a window with a hierarchy of outline boxes.&amp;nbsp; I would like the user to select some boxes, and then retrieve the hierarchy with JSL.&amp;nbsp; Is this possible?&amp;nbsp; I only have 1 layer in my example&amp;nbsp;hierarchy.&amp;nbsp; Ideally, this will work for a many-layered&amp;nbsp;hierarchy.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;but ultimately I would like several layers.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am using JMP 18.1.2.&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 );

cary = Associative Array();
cary["state"] = "NC";
cary["population"] = 116234;
cary["weather"] = "cloudy";
cary["population"] += 10;
cary["weather"] = "sunny";
cary["high schools"] = {"Cary", "Green Hope", "Panther Creek"};

Print( cary );

add_outline = Function( {target, input},
	{Default Local},
	Try(
		If( Type( input ) == "Associative Array",
			For Each( {key, index}, input &amp;lt;&amp;lt; Get Keys,
				target &amp;lt;&amp;lt; Append( Outline Box( key ) );
				add_outline( target[key], input[key] );
			)
		,
			target &amp;lt;&amp;lt; Append( Text Box( input ) )
		)
	,
		target &amp;lt;&amp;lt; Append( Text Box( "null" ) )
	)
);

win = New Window( "Cary Window" );
add_outline( win, cary );

// User will select some values.

win &amp;lt;&amp;lt; Get Selected; // How to get selected values?&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 11 Mar 2025 00:29:17 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Get-Selected-Outline-Box-Values/m-p/847193#M102182</guid>
      <dc:creator>robot</dc:creator>
      <dc:date>2025-03-11T00:29:17Z</dc:date>
    </item>
    <item>
      <title>Re: Get Selected Outline Box Values</title>
      <link>https://community.jmp.com/t5/Discussions/Get-Selected-Outline-Box-Values/m-p/847254#M102188</link>
      <description>&lt;P&gt;Use XPath. First select some value(s) &lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jthi_0-1741674652617.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/73733i53B8D7066ED94337/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jthi_0-1741674652617.png" alt="jthi_0-1741674652617.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Then use &amp;lt;&amp;lt; Get XML&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;win &amp;lt;&amp;lt; get xml&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Find the selected element from log to see how you could access it&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jthi_1-1741674694438.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/73734i1DAEA16C9005BBDD/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jthi_1-1741674694438.png" alt="jthi_1-1741674694438.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Then write an XPath query and use it with &amp;lt;&amp;lt; XPath. This example might not be what you are looking for as it looks for all selected elements&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;win &amp;lt;&amp;lt; XPath("//*[@selected = 'true']")&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 11 Mar 2025 06:32:47 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Get-Selected-Outline-Box-Values/m-p/847254#M102188</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2025-03-11T06:32:47Z</dc:date>
    </item>
  </channel>
</rss>

