cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • New to JMP? Join us Sept. 23-24 for the Early User Edition of Discovery Summit, tailor-made for new users. Register now for free!

Discussions

Solve problems, and share tips and tricks with other JMP users.
Choose Language Hide Translation Bar
Djtjhin
Level IV

Button to open specific outline in a journal

Is there a way to add button in a journal that opens a specific outline within the journal ? (e.g. similar to in-document referencing in word documents)

I've seen journals used <<open next outline, but I believe this  won't be able to open outline box if it's not positioned right next to the containing outline box. 

1 ACCEPTED SOLUTION

Accepted Solutions
jthi
Super User

Re: Button to open specific outline in a journal

Maybe you can use something like this:

Current Journal()[OutlineBox("Outline3")] << Close(0)

jthi_0-1663054356904.png

 

-Jarmo

View solution in original post

4 REPLIES 4
jthi
Super User

Re: Button to open specific outline in a journal

Maybe you can use something like this:

Current Journal()[OutlineBox("Outline3")] << Close(0)

jthi_0-1663054356904.png

 

-Jarmo
Djtjhin
Level IV

Re: Button to open specific outline in a journal

@jthi  Yeah, I was using xml and was able to get it to work :) 

Now I wonder if there's a way to bring the opened outline to the top of the page. Any ideas on this ?

jthi
Super User

Re: Button to open specific outline in a journal

Not sure if you can move display element, but you could maybe remove and then re-add it

Names Default To Here(1);
New Window("WrapListBox",
	vlb = V List Box(
		ob1 = Outline Box("1"),
		ob2 = Outline Box("2"),
		ob3 = Outline Box("3"),
	);
);

wait(1);
ob_to_move = Remove From(vlb, Contains(vlb << XPath("//OutlineBox"), ob3));
wait(1);
Insert Into(vlb, ob_to_move, 1);
-Jarmo
txnelson
Super User

Re: Button to open specific outline in a journal

Another way of handling this, is to completely hide the outline box of interest, rather than closing it;  The button box can then redisplay the outline box, rather than opening it.  This is all done using the Visibility element available to the Outline Box() object.

txnelson_0-1663057966494.png

Names Default To Here( 1 );
dt = 
// Open Data Table: Big Class.jmp
// → Data Table( "Big Class" )
Open( "/C:/Program Files/SAS/JMPEA/17/Samples/Data/Big Class.jmp" );

ow = Oneway(
	Y( :height ),
	X( :age ),
	Means( 1 ),
	Box Plots( 1 ),
	Mean Diamonds( 1 )
);
nw = New Window( "My Display",
	<<journal,
	bb = Button Box( "Display Anova",
		nw["Oneway Anova"] << visibility( switch );
		If( switch == "visible",
			switch = "collapse";
			bb << set button name( "Hide Anova" );
		,
			switch = "visible";
			bb << set button name( "Display Anova" );
		)
	
		;
	)
);
Report( ow ) << journal;
ow << close window;
switch = "visible";
nw["Oneway Anova"] << visibility( "collapse" );
Jim

Recommended Articles