<?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 JMP &amp;gt; JSL &amp;gt; Journal &amp;gt; How to Identify Collapsed versus Expanded Items? in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/JMP-gt-JSL-gt-Journal-gt-How-to-Identify-Collapsed-versus/m-p/524150#M74880</link>
    <description>&lt;P&gt;Hi JMP Community,&lt;/P&gt;
&lt;P&gt;I want to extract items from an existing Journal based on their Collapsed / Expanded status. I tried to use the "Root &amp;lt;&amp;lt; is collapsed (Node)" method but it is returning an empty value independently of Collapsed/Expanded status (see JSL &lt;U&gt;work in progress&lt;/U&gt; below).&lt;/P&gt;
&lt;P&gt;(JMP 16.1, Windows 10 Pro)&lt;/P&gt;
&lt;P&gt;Questions:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Is the "&amp;lt;&amp;lt; is Collapsed" method applicable to journal structures?&lt;/LI&gt;
&lt;LI&gt;If it does, what is its correct usage, especially regarding "root" and "node" definitions?&lt;/LI&gt;
&lt;LI&gt;If it does not, what alternative could I use to return the collapsed status of a Journal item?&lt;/LI&gt;
&lt;/OL&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default to Here (1);

winlist = Window () &amp;lt;&amp;lt; Get Window Title ();

For( i = N Items( winlist ), i &amp;gt; 0, i--,
	If( (Window( winlist[i] ) &amp;lt;&amp;lt; Window Class Name) != "Journal",
		Remove From( winlist, i )
	)
);

If (N items (winlist) == 0, New Window ("ERROR", Text Box ("!!!! NO JOURNAL CURRENTLY OPENED !!!!")); throw (1));

dw = New Window (" PICK A JOURNAL ",
	&amp;lt;&amp;lt; MODAL,
	V List Box (	
		Text Box (" SELECT A JOURNAL"),
		wl = List Box (	winlist,
						Width (500),
						Max Selected (1),
						nlines (10)
						),
		
		Text Box (" Enter number of plots per row"),
		nbe = Number Edit Box (5),	
		
		Text Box (" REMOVE LEGEND? "),
		rb = Radio Box( {"YES", "NO"}),	
		
		Text Box (" PLOT ONLY EXPANDED? "),
		rb2 = Radio Box( {"YES", "NO"}),			
		
		Button Box ("OK", jrn_l = (wl &amp;lt;&amp;lt; get selected); npr = nbe &amp;lt;&amp;lt; get (); lg_x = rb &amp;lt;&amp;lt; get (); ex_x = rb2 &amp;lt;&amp;lt; get (); switch = 1),
		
		Button Box ("CANCEL", switch = 0; Throw(1))			
		),
		

	
	);


show (jrn_l);
show (npr);
show (lg_x);
show (ex_x);

If (switch == 0, Throw (1));

jrn = Get Window (jrn_l [1]);

show (jrn);

nplot = N Items (jrn &amp;lt;&amp;lt; Xpath ("//OutlineBox"));

dummy = Lineup Box(N Col (1));
win = New window ("PLOTS",
	mybox = Lineup Box (N Col (npr))
);

For (i = 1, i&amp;lt;= nplot, i++,
	collp = jrn &amp;lt;&amp;lt; is collapsed (OutlineBox (i));
	show (collp);
	if (collp == 1, 
			dummy = Lineup Box(N Col (1));
			Plot = jrn [PictureBox (i)];
			dummy &amp;lt;&amp;lt; Append (Plot);
			if(lg_x == 1, 
				zzz = Dummy &amp;lt;&amp;lt; Xpath ("//LegendBox");
				zzz &amp;lt;&amp;lt; delete
			   );	
			mybox &amp;lt;&amp;lt; Append (Dummy)
		)	
	
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Thank you.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;TS&lt;/P&gt;</description>
    <pubDate>Sun, 11 Jun 2023 11:26:02 GMT</pubDate>
    <dc:creator>Thierry_S</dc:creator>
    <dc:date>2023-06-11T11:26:02Z</dc:date>
    <item>
      <title>JMP &gt; JSL &gt; Journal &gt; How to Identify Collapsed versus Expanded Items?</title>
      <link>https://community.jmp.com/t5/Discussions/JMP-gt-JSL-gt-Journal-gt-How-to-Identify-Collapsed-versus/m-p/524150#M74880</link>
      <description>&lt;P&gt;Hi JMP Community,&lt;/P&gt;
&lt;P&gt;I want to extract items from an existing Journal based on their Collapsed / Expanded status. I tried to use the "Root &amp;lt;&amp;lt; is collapsed (Node)" method but it is returning an empty value independently of Collapsed/Expanded status (see JSL &lt;U&gt;work in progress&lt;/U&gt; below).&lt;/P&gt;
&lt;P&gt;(JMP 16.1, Windows 10 Pro)&lt;/P&gt;
&lt;P&gt;Questions:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Is the "&amp;lt;&amp;lt; is Collapsed" method applicable to journal structures?&lt;/LI&gt;
&lt;LI&gt;If it does, what is its correct usage, especially regarding "root" and "node" definitions?&lt;/LI&gt;
&lt;LI&gt;If it does not, what alternative could I use to return the collapsed status of a Journal item?&lt;/LI&gt;
&lt;/OL&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default to Here (1);

winlist = Window () &amp;lt;&amp;lt; Get Window Title ();

For( i = N Items( winlist ), i &amp;gt; 0, i--,
	If( (Window( winlist[i] ) &amp;lt;&amp;lt; Window Class Name) != "Journal",
		Remove From( winlist, i )
	)
);

If (N items (winlist) == 0, New Window ("ERROR", Text Box ("!!!! NO JOURNAL CURRENTLY OPENED !!!!")); throw (1));

dw = New Window (" PICK A JOURNAL ",
	&amp;lt;&amp;lt; MODAL,
	V List Box (	
		Text Box (" SELECT A JOURNAL"),
		wl = List Box (	winlist,
						Width (500),
						Max Selected (1),
						nlines (10)
						),
		
		Text Box (" Enter number of plots per row"),
		nbe = Number Edit Box (5),	
		
		Text Box (" REMOVE LEGEND? "),
		rb = Radio Box( {"YES", "NO"}),	
		
		Text Box (" PLOT ONLY EXPANDED? "),
		rb2 = Radio Box( {"YES", "NO"}),			
		
		Button Box ("OK", jrn_l = (wl &amp;lt;&amp;lt; get selected); npr = nbe &amp;lt;&amp;lt; get (); lg_x = rb &amp;lt;&amp;lt; get (); ex_x = rb2 &amp;lt;&amp;lt; get (); switch = 1),
		
		Button Box ("CANCEL", switch = 0; Throw(1))			
		),
		

	
	);


show (jrn_l);
show (npr);
show (lg_x);
show (ex_x);

If (switch == 0, Throw (1));

jrn = Get Window (jrn_l [1]);

show (jrn);

nplot = N Items (jrn &amp;lt;&amp;lt; Xpath ("//OutlineBox"));

dummy = Lineup Box(N Col (1));
win = New window ("PLOTS",
	mybox = Lineup Box (N Col (npr))
);

For (i = 1, i&amp;lt;= nplot, i++,
	collp = jrn &amp;lt;&amp;lt; is collapsed (OutlineBox (i));
	show (collp);
	if (collp == 1, 
			dummy = Lineup Box(N Col (1));
			Plot = jrn [PictureBox (i)];
			dummy &amp;lt;&amp;lt; Append (Plot);
			if(lg_x == 1, 
				zzz = Dummy &amp;lt;&amp;lt; Xpath ("//LegendBox");
				zzz &amp;lt;&amp;lt; delete
			   );	
			mybox &amp;lt;&amp;lt; Append (Dummy)
		)	
	
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Thank you.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;TS&lt;/P&gt;</description>
      <pubDate>Sun, 11 Jun 2023 11:26:02 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JMP-gt-JSL-gt-Journal-gt-How-to-Identify-Collapsed-versus/m-p/524150#M74880</guid>
      <dc:creator>Thierry_S</dc:creator>
      <dc:date>2023-06-11T11:26:02Z</dc:date>
    </item>
    <item>
      <title>Re: JMP &gt; JSL &gt; Journal &gt; How to Identify Collapsed versus Expanded Items?</title>
      <link>https://community.jmp.com/t5/Discussions/JMP-gt-JSL-gt-Journal-gt-How-to-Identify-Collapsed-versus/m-p/524250#M74889</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Is Collapsed()&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;is the proper way to work with Outline Boxes to determine if they are Open or Closed(Expanded or Collapsed);&amp;nbsp; On another dimension, an outline box has a Visibility dimension, which deals with the actual displaying of the object.&amp;nbsp; The Visibility() element is used to make an object, Visible, Hidden or Collapsed.&amp;nbsp; The Get Visibility() function determins the diplay objects visibility status.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
//This message applies to all display box objects
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
d = dt &amp;lt;&amp;lt; Distribution( Column( :height ) );
r = d &amp;lt;&amp;lt; report;
tb = r[Table Box( 1 )];
Show( tb &amp;lt;&amp;lt; Get Visibility );
Wait( 2 );
tb &amp;lt;&amp;lt; Visibility( "Collapse" );
Show( tb &amp;lt;&amp;lt; Get Visibility );&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Jul 2022 02:45:59 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JMP-gt-JSL-gt-Journal-gt-How-to-Identify-Collapsed-versus/m-p/524250#M74889</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2022-07-21T02:45:59Z</dc:date>
    </item>
    <item>
      <title>Re: JMP &gt; JSL &gt; Journal &gt; How to Identify Collapsed versus Expanded Items?</title>
      <link>https://community.jmp.com/t5/Discussions/JMP-gt-JSL-gt-Journal-gt-How-to-Identify-Collapsed-versus/m-p/524276#M74893</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/2687"&gt;@txnelson&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;I found that example in the Scripting Help, too, but it does not return the collapsed state of an item in a journal. Instead, it returns the Visible / Hidden state of an item which is not the same, unfortunately.&lt;/P&gt;
&lt;P&gt;Also, I wonder if the &amp;lt;&amp;lt; Get Visibility works differently in an active report versus a journal.&lt;/P&gt;
&lt;P&gt;Thanks for your insights.&lt;/P&gt;
&lt;P&gt;Best,&lt;/P&gt;
&lt;P&gt;TS&lt;/P&gt;</description>
      <pubDate>Thu, 21 Jul 2022 04:53:58 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JMP-gt-JSL-gt-Journal-gt-How-to-Identify-Collapsed-versus/m-p/524276#M74893</guid>
      <dc:creator>Thierry_S</dc:creator>
      <dc:date>2022-07-21T04:53:58Z</dc:date>
    </item>
    <item>
      <title>Re: JMP &gt; JSL &gt; Journal &gt; How to Identify Collapsed versus Expanded Items?</title>
      <link>https://community.jmp.com/t5/Discussions/JMP-gt-JSL-gt-Journal-gt-How-to-Identify-Collapsed-versus/m-p/524298#M74895</link>
      <description>&lt;P&gt;Hi JMP Community and&amp;nbsp;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/2687"&gt;@txnelson&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;After reviewing all the methods applicable to OutlineBox objects, I finally found the solution to my own query: &lt;U&gt;&lt;STRONG&gt;&amp;lt;&amp;lt; GetOpen&lt;/STRONG&gt;&lt;/U&gt; returns 1 for Expanded items and 0 for Collapsed items.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best,&lt;/P&gt;
&lt;P&gt;TS&lt;/P&gt;</description>
      <pubDate>Thu, 21 Jul 2022 05:21:51 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JMP-gt-JSL-gt-Journal-gt-How-to-Identify-Collapsed-versus/m-p/524298#M74895</guid>
      <dc:creator>Thierry_S</dc:creator>
      <dc:date>2022-07-21T05:21:51Z</dc:date>
    </item>
  </channel>
</rss>

