cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • JMP will suspend normal business operations for our Winter Holiday beginning on Wednesday, Dec. 24, 2025, at 5:00 p.m. ET (2:00 p.m. ET for JMP Accounts Receivable).
    Regular business hours will resume at 9:00 a.m. EST on Friday, Jan. 2, 2026.
  • We’re retiring the File Exchange at the end of this year. The JMP Marketplace is now your destination for add-ins and extensions.

Discussions

Solve problems, and share tips and tricks with other JMP users.
Choose Language Hide Translation Bar

Deleting table variables

I'm trying to delete table properties in a loop but nothing happens. There's no error message in the log window, so I'm not sure why i can't delete table variables in a loop.

If I use a literal string I'm able to delete the variable, but I would like to delete a list of variables by pattern matching.


dt = New Table("test");



dt << New Table Variable("a", 1);


dt << New Table Variable("b", 1);


dt << New Table Variable("c", 1);



names = dt << Get Table Variable Names;



for(i = N Items(names), i > 0, i--,


    variable = names;


    // Fails


    dt << Delete Table Variable(variable);


);



// Ok


dt << Delete Table Variable("a")


1 ACCEPTED SOLUTION

Accepted Solutions
ms
Super User (Alumni) ms
Super User (Alumni)

Re: Deleting table variables

Your example works here, JMP 10.0.2 for Mac. But it may not be working in JMP 9. Are you using a version <10?

Try this in JMP 9:

dt = New Table( "test" );

dt << New Table Variable( "a", 1 );

dt << New Table Variable( "b", 1 );

dt << New Table Variable( "c", 1 );

names = dt << Get Table Variable Names;

For( i = N Items( names ), i > 0, i--,

  variable = names[i];

  Eval( Parse( Eval Insert( "dt << Delete Table Variable(^nameexpr(variable)^)" ) ) )

);

View solution in original post

2 REPLIES 2
ms
Super User (Alumni) ms
Super User (Alumni)

Re: Deleting table variables

Your example works here, JMP 10.0.2 for Mac. But it may not be working in JMP 9. Are you using a version <10?

Try this in JMP 9:

dt = New Table( "test" );

dt << New Table Variable( "a", 1 );

dt << New Table Variable( "b", 1 );

dt << New Table Variable( "c", 1 );

names = dt << Get Table Variable Names;

For( i = N Items( names ), i > 0, i--,

  variable = names[i];

  Eval( Parse( Eval Insert( "dt << Delete Table Variable(^nameexpr(variable)^)" ) ) )

);

Re: Deleting table variables

I'm using JMP 9. Your solutions works. Thanks

Recommended Articles