cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • DownloadSemiconductor Toolkit: Tools to create wafer maps, add wafer geometry to graphics, explore die defects & compare wafers.
  • Discovery Summit 2026: Early User Edition - September 23-24.Register. It's free.
  • See how to design an experiment, explore factor-response relationships, assess tradeoffs, and ID best settings. Register for Sep. 11 Mastering JMP.

Discussions

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

Using Character Variables with SetData in Tree Nodes

I hope to use "Set data" to configure the information in the tree node. However, the variable usage does not meet my expectations. As shown in the JSL below, I want to record the text "Test" in the variable Title and set it into C1, so that Show(C1) displays as C1 << Get Data = {"Test", "", 1};
The results of using a variable (C1 situation) and directly using text data (C2 situation) for setData differ, which leads to errors when I later attempt to retrieve the data. How can I use a variable to set data so that I can obtain the same result as directly setting "Test" with setData?

 

Title = "Test";
C1 = Tree Node( Title );
C1 << SetData( {Title, "", 1} );
Show( C1 << Get Data );
Show(( C1 << Get Data )[1] );

C2 = Tree Node( "Test2" );
C2 << SetData( {"Test2", "", 1} );
Show( C2 << Get Data );
Show( (C2 << Get Data) [1] );
1 ACCEPTED SOLUTION

Accepted Solutions
jthi
Super User

Re: Using Character Variables with SetData in Tree Nodes

You will have to evaluate the list, for example

Names Default To Here(1);

Title = "Test";
C1 = Tree Node(Title);
C1 << SetData(Eval List({Title, "", 1}));
Show(C1 << Get Data);
// C1 << Get Data = {"Test", "", 1};
-Jarmo

View solution in original post

2 REPLIES 2
jthi
Super User

Re: Using Character Variables with SetData in Tree Nodes

You will have to evaluate the list, for example

Names Default To Here(1);

Title = "Test";
C1 = Tree Node(Title);
C1 << SetData(Eval List({Title, "", 1}));
Show(C1 << Get Data);
// C1 << Get Data = {"Test", "", 1};
-Jarmo
BabyDoragon
Level IV

Re: Using Character Variables with SetData in Tree Nodes

 
Thank you for swiftly and accurately resolving the issue I encountered.

Recommended Articles