cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • JMP will suspend normal business operations for our Winter Holiday beginning on Wednesday, Dec. 24, 2025, at 5:00 p.m. ET (2:00 p.m. ET for JMP Accounts Receivable).
    Regular business hours will resume at 9:00 a.m. EST on Friday, Jan. 2, 2026.
  • We’re retiring the File Exchange at the end of this year. The JMP Marketplace is now your destination for add-ins and extensions.

Discussions

Solve problems, and share tips and tricks with other JMP users.
jetpeach
Level III

add tab to journal that has tabs already

I have a report with tabs that I created a journal from.

Let in script, I need to add to the journal sometimes - I want more tabs in it.

 

Example code is below, but it always puts the new tabs on the bottom of one of the other tabs.  The behavior I want is 5 tabs in the journal'd output.

Any help to do this? I tried add instead of append, but can't seem to find right command.

Thanks,

Joe

 

nw = new window("Tabs",tab box(
	tab page box(Title("test1"),text box("1st tab")),
	tab page box(Title("test2"),text box("2st tab")),
	tab page box(Title("test3"),text box("3st tab"))
	)
);

nw << journal;

nw2 = new window("Tabs2",tab box(
	tab page box(Title("test4"),text box("4st tab")),
	tab page box(Title("test5"),text box("5st tab"))
	)
);

current journal() << append(nw2);

 

1 ACCEPTED SOLUTION

Accepted Solutions
txnelson
Super User

Re: add tab to journal that has tabs already

Adding to the journal will do just that, add to the journal, not to the Tab Box();You need to directly reference the tab box() if you want to add to it.  Below is a simple rework of your code that is one way to add elements to the journal Tab Box();

nw = new window("Tabs",<<journal);
ttt=tab box(
	tab page box(Title("test1"),text box("1st tab")),
	tab page box(Title("test2"),text box("2st tab")),
	tab page box(Title("test3"),text box("3st tab"))
	);


nw << append(ttt);

ttt<<insert(4,"test4",text box("4st tab"));
ttt<<insert(5,"test5",text box("5st tab"));
Jim

View solution in original post

2 REPLIES 2
txnelson
Super User

Re: add tab to journal that has tabs already

Adding to the journal will do just that, add to the journal, not to the Tab Box();You need to directly reference the tab box() if you want to add to it.  Below is a simple rework of your code that is one way to add elements to the journal Tab Box();

nw = new window("Tabs",<<journal);
ttt=tab box(
	tab page box(Title("test1"),text box("1st tab")),
	tab page box(Title("test2"),text box("2st tab")),
	tab page box(Title("test3"),text box("3st tab"))
	);


nw << append(ttt);

ttt<<insert(4,"test4",text box("4st tab"));
ttt<<insert(5,"test5",text box("5st tab"));
Jim
jetpeach
Level III

Re: add tab to journal that has tabs already

great, thanks txnelson. this works for me. i was misundertanding journals, thinking they were always static copies of whatever was being journaled, and hadn't thought to try adding in the way you suggested.

Recommended Articles