cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Browse apps to extend the software in the new JMP Marketplace
Choose Language Hide Translation Bar

Table Boxes - can I hide or unhide rows?

Hi - is it possible within a script to hide/unhide specific rows within a Table Box?  I can hide/unhide specific columns, but I can't see any properties of a Table Box that would enable me to do the same for rows, however I've overlooked or misinterpreted such things in the past.  Presumably I could go back to the table from which the Table Box was created, hide whichever rows I want and then recreate the Table Box from it, but I really don't want to have to do that as the original table was deleted way back in the script.  Is there another way?

Many thanks for any suggestions.

1 ACCEPTED SOLUTION

Accepted Solutions
David_Burnham
Super User (Alumni)

Re: Table Boxes - can I hide or unhide rows?

Dave

I reckon you're gonna have to bite the bullet and do it the brut force way.  A couple of questions for you (1) what is the source of the table box (something you created yourself, or something generated by JMP within a report (2) where does the hide/unhide requirement come from (e.g. is it in response to a change of row states generated by the user, or some logic in the code) ?  Finally, given that I think you do need to "just" regenerate the table box, do you need to recreate the table or can you convert the table box to a table, delete the table box, do the hide/unhide thing, then regenerate the table box.

This feels to me like one of those scenarios that we face as programmers, where we really don't want to do something, and we put it off, and off, and ... hey its the weekend soon ... and yes its tedious to write but come runtime it will work great and you just know you will need this logic sometime in the future!

Dave

-Dave

View solution in original post

3 REPLIES 3
David_Burnham
Super User (Alumni)

Re: Table Boxes - can I hide or unhide rows?

Dave

I reckon you're gonna have to bite the bullet and do it the brut force way.  A couple of questions for you (1) what is the source of the table box (something you created yourself, or something generated by JMP within a report (2) where does the hide/unhide requirement come from (e.g. is it in response to a change of row states generated by the user, or some logic in the code) ?  Finally, given that I think you do need to "just" regenerate the table box, do you need to recreate the table or can you convert the table box to a table, delete the table box, do the hide/unhide thing, then regenerate the table box.

This feels to me like one of those scenarios that we face as programmers, where we really don't want to do something, and we put it off, and off, and ... hey its the weekend soon ... and yes its tedious to write but come runtime it will work great and you just know you will need this logic sometime in the future!

Dave

-Dave

Re: Table Boxes - can I hide or unhide rows?

Hi Dave,

In answer to your questions, the table box was created by me from a data table derived from one of the standard platforms, so I'm essentially trying to summarize the output of that platform in a different format.  There's quite a lot of work being done after the platform is run however, and a lot of tables are derived like this along the way, which is why I don't particularly want to leave them lying around in the workspace, even though they'd be invisible.  The need to remove rows subsequently is driven by a requirement for the user to be able to exclude any that he/she doesn't want to see in the final report - and that will be done via an assortment of buttons and/or check boxes within the user interface.

No, you're right: the best way to do it is probably to write a small function that takes a table box and a list of as many binary flags as there are rows in the table as inputs, convert the contents of the table box into an invisible data table, then create a new table box from that, using the list of flags to knock out the rows I don't want to see, and copying the formats of the original columns as I go.  I'll then just replace the old table box with the new one - which will probably happen so fast and slickly that if the user blinks he'll miss it.  It'll take very little time actually to script it; the key point I wanted to establish was that there wasn't a way directly to edit the original table box - and it seems there isn't.

Many thanks!  And now it's time to roll up the sleeves...

David_Burnham
Super User (Alumni)

Re: Table Boxes - can I hide or unhide rows?

I'm always deleting and re-appending content to containers - JMP seems to be really smart in with the windows updates and you shouldn't see any flicker.  If you do, its usually because the window "collapses" in size because it has lost some content.  You can fix this by using Spacer Boxes to act as "splines" that maintain the window size as the new content is substituted.

Dave

-Dave