Choose Language Hide Translation Bar
0 Kudos

Allow custom tableboxes to "make into combined data table"

I'd like it if we could make a combined data table from custom tables if they are carrying "the same" info like native reports do.  

  For instance: allow all of these to somehow have the ages attached to them without having to hide columns and make custom "make into combined data table" functionalities

Names Default to Here(1);
dt = Open("$SAMPLE_DATA\Big Class.jmp");
Summarize(ages = by(:age));
 
hlb = hlistbox();
for(i=1, i<=nitems(ages), i++, 
       rows = dt << Get Rows Where(char(Column(dt, "age")[]) == ages[i]);
       
       tblbox = Tablebox(
              StringColBox("Sex", 
                     dt:sex[rows]
              ), 
              StringColBox("Name", 
                     dt:name[rows]
              )
       );
       hlb << append(
              OutlineBox(ages[i], 
                     tblbox
              )
       )
);
 
new window("Test", 
       hlb
);

Tracking Number:

Defect ID:

2 Comments
Super User

@vince_faller ,

 

I am confused by this request. Make Combined Data Table grabs report window tables and combines them into a JMP Data Table.  Run the script below, right click on any sub table and select Make Combined Data Table and it works.  You also have a later Wish List request to set breaks for a table.   Given that request and this one, maybe a more JMP-like request is to add a By() option for TableBox(). Similar to a Bivariate with By that creates multiple Bivariates, it would create multiple TableBoxes.   Just my 2 cents.

Names Default to Here(1);
dt = Open("$SAMPLE_DATA\Big Class.jmp");

idx = dt << new column("seq", numeric, << set each value(row()));
summarize(tgrp = By(:age), ibeg=minimum(idx), iend=maximum(idx));

new window("Row Borders", 
	tblbox = VListBox(tablebox(
		NumberColBox("age", dt:age[ibeg[1]::iend[1]] ),
		StringColbox("Sex", dt:sex[ibeg[1]::iend[1]]), 
		NumberColBox("Height", dt:height[ibeg[1]::iend[1]])
	))
);
for(i=2, i<=nitems(tgrp), i++,
	tblbox << append(
		tablebox(
		NumberColBox("age", dt:age[ibeg[i]::iend[i]] ),
		StringColbox("Sex", dt:sex[ibeg[i]::iend[i]]), 
		NumberColBox("Height", dt:height[ibeg[i]::iend[i]])
	)
	)
	
);
Super User

I wrote this a long time ago and just copied over.  Apparently it does work.  My bad.