We’re asking you to select a content label when starting a new topic in the Discussions area. Read more to find out why.
Choose Language Hide Translation Bar
Highlighted
djhanson
Level V

Clear Column Contents Message

Besides looping thru a column's rows, does JSL happen to have a column message to clear/delete a column's contents?  just curious... thx, dj

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
ms
Super User ms
Super User

Re: Clear Column Contents Message

No dedicated "delete content" command that I am aware of. However <<Set Each Value() can be used as such a message. Another option is Main Menu("Delete"), but I do not recommend that unless one has 100% control over what is selected in the current data table (it may in some circumstances even delete the code in the script editor rather than the column content).

Names Default To Here( 1 );

dt = Open( "$SAMPLE_DATA/Big Class.jmp" );

// A simple way to do it

Column( "age" ) << set each value( Empty() );

Column( "name" ) << set each value( Empty() );

// Another, more risky, way to do it

dt << select all rows;

Column( "sex" ) << setselected( 1 );

Main Menu( "Delete" );

View solution in original post

1 REPLY 1
Highlighted
ms
Super User ms
Super User

Re: Clear Column Contents Message

No dedicated "delete content" command that I am aware of. However <<Set Each Value() can be used as such a message. Another option is Main Menu("Delete"), but I do not recommend that unless one has 100% control over what is selected in the current data table (it may in some circumstances even delete the code in the script editor rather than the column content).

Names Default To Here( 1 );

dt = Open( "$SAMPLE_DATA/Big Class.jmp" );

// A simple way to do it

Column( "age" ) << set each value( Empty() );

Column( "name" ) << set each value( Empty() );

// Another, more risky, way to do it

dt << select all rows;

Column( "sex" ) << setselected( 1 );

Main Menu( "Delete" );

View solution in original post