- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Updating existing Table Box Row
Hello JMP Community,
I currently have on my interface a Table Box loading data from a JMP dt.
Is there a way to "update" Table Box row? Or do I need to refresh the whole Table box? I was trying to update a row for the sake of performance.
Thanks!
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Upading Table Box Row
I don't see any other way than setting the entire row or using get and set the column values.
Names Default To Here( 1 );
New Window( "test",
tb = Table Box(
scb1 = String Col Edit Box( "string col", {"a", "c", "d", "d", "e"} ),
ncb1 = Number Col Edit Box( "number col", {1,2,3,4,5} )
)
);
wait(2);
_xx = scb1<<get;
_xx[1] ="z";
scb1 << set( _xx);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Upading Table Box Row
A TableBox is comprised of mutiple StringColEditBox and NumberColEditBox display boxes. You can add and remove elemets to these column display boxes.
However, it might be easier to insert and delete rows. This is a modification of Scripting Index scripts.
Names Default To Here( 1 );
New Window( "test",
tb = Table Box(
scb1 = String Col Edit Box( "string col", {"a", "c", "d", "d", "e"} ),
ncb1 = Number Col Edit Box( "number col", {1,2,3,4,5} )
)
);
wait(2);
tb << delete row(2);
tb << insert row( 2, {"b", 2} );
tb<<delete row(3);
tb << insert row(3, {"c", 3});
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Upading Table Box Row
That is already a step forward. Much better thank reloading the whole table. Thanks!
To build on top of your example, this is what I was trying to do. Lets say i wanted to update that first "a" with a "z": But it just didnt work.
Names Default To Here( 1 );
New Window( "test",
tb = Table Box(
scb1 = String Col Edit Box( "string col", {"a", "c", "d", "d", "e"} ),
ncb1 = Number Col Edit Box( "number col", {1,2,3,4,5} )
)
);
wait(2);
scb1[1] = "a";
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Upading Table Box Row
I don't see any other way than setting the entire row or using get and set the column values.
Names Default To Here( 1 );
New Window( "test",
tb = Table Box(
scb1 = String Col Edit Box( "string col", {"a", "c", "d", "d", "e"} ),
ncb1 = Number Col Edit Box( "number col", {1,2,3,4,5} )
)
);
wait(2);
_xx = scb1<<get;
_xx[1] ="z";
scb1 << set( _xx);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Upading Table Box Row
There is also the option of createing a data table from the columns you want using the Data Table Col Box(). When you update the table the display is updated.
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
nw = New Window( "Example",
Table Box( Data Table Col Box( :name ), Data Table Col Box( :height ) )
);
nw[Table Box( 1 )] << set scrollable( 10, 0 );
wait(2);
:height[1]=60;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Upading Table Box Row
I got one big data with data from multiple customers and I only want to show for 1 customer, and I was trying to avoid subsets because I am updating the table as the user edit a Numeric Col Box.