cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Check out the JMP® Marketplace featured Capability Explorer add-in
Choose Language Hide Translation Bar
vkessler
Level IV

Data Table Visibility

Hi everyone,

i want to set the visibility ("private" or "invisible") of a data table with a variable. Unfortunately this doesn´t work for me. Here is a short example:

Names Default To Here (1);

name ="foo";

visibility = "private";

dt = New Table (name, visibility , New Column("bar", Character, "Nominal") );

Although the variable "visibility" is set to "private", JMP still shows me a data table with the name "foo". Using "Eval Insert" also didn´t work for me.

Is there a way to set the visibility of a data table with a variable?

Thank you!

Victor

2 ACCEPTED SOLUTIONS

Accepted Solutions
txnelson
Super User

Re: Data Table Visibility

Victor,

I was able to solve the problem by placing the whole new table function into a literal string and then evaluating the created string:

eval(parse("dt = New Table (name,"||visibility||", New Column(\!"bar\!", Character, Nominal) )"));

It isn't pretty, but it works.

Jim

View solution in original post

Re: Data Table Visibility

This thread is rather old, but i found where it was specifically addressed in JMP 13. The values of the visibility() option will properly evaluate now, if you're using a variable to control it.

View solution in original post

5 REPLIES 5
txnelson
Super User

Re: Data Table Visibility

Victor,

I was able to solve the problem by placing the whole new table function into a literal string and then evaluating the created string:

eval(parse("dt = New Table (name,"||visibility||", New Column(\!"bar\!", Character, Nominal) )"));

It isn't pretty, but it works.

Jim
vkessler
Level IV

Re: Data Table Visibility

Thanks for the fast reply! As you said, it´s a bit bulky, but it works

Craige_Hales
Super User

Re: Data Table Visibility

You can also manipulate the expression:

name = "foo";

visibility = "private"; // "private" or "invisible"

dt = Eval( Eval Expr( New Table( name, Expr( visibility ), New Column( "bar", Character, "Nominal" ) ) ) );

Show( dt );

Close( dt, nosave );

Craige
vkessler
Level IV

Re: Data Table Visibility

Thank you. This solution looks even cleaner. But both are working fine.

Re: Data Table Visibility

This thread is rather old, but i found where it was specifically addressed in JMP 13. The values of the visibility() option will properly evaluate now, if you're using a variable to control it.