- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Move Rows
Hello
I have calculated the table, but I want to move rows in this table.
For example, I want to move the GPIO row to the start of the table and the JTAG row after GPIO.
I tried to write this script, but something went wrong, can you assist me with this script?
dt << Move Rows ( {"GPIO"}, At Start );
dt << Move Rows ( {"JTAG"}, After( "GPIO" ) );
1 ACCEPTED SOLUTION
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Move Rows
<< Move Rows seems to work with selected rows
Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Big Class.jmp");
r = dt << Select Rows([5, 7, 8, 10]);
Wait(2);
r << Move Rows(At Start);
-Jarmo
4 REPLIES 4
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Move Rows
My suggestion is to open the Value Ordering column property, and change the order of the values in there, and then just sort the data table based upon the Parmeter column, and it will follow the Value Order you specified.
Jim
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Move Rows
Is there a script command to move rows in a table?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Move Rows
Here is one way of moving a row:
Names Default To Here( 1 );
DT = Current Data Table();
rowToMove = dt[5, 0];
dt << delete row( 5 );
dt << add rows( 1, after( 12 ) );
dt[13, 0] = rowToMove;
Jim
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Move Rows
<< Move Rows seems to work with selected rows
Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Big Class.jmp");
r = dt << Select Rows([5, 7, 8, 10]);
Wait(2);
r << Move Rows(At Start);
-Jarmo