Table variables are for storing a single text string value, such as “Notes”. To understand how variables work, first get its existing value by sending a Get Table Variable message:
dt = Open( "$SAMPLE_DATA/Solubility.jmp" );
dt << Get Table Variable( "Notes" );
"Chemical compounds were measured for solubility in different solvents. This table shows the log of the partition coefficient (logP) of 72 organic solutes in 6 aqueous/nonpolar systems."
Now change the existing value of the string using Set Table Variable or New Table Variable, and then use Get Table Variable again to check that the string has been updated:
dt << Set Table Variable( "Notes", "Solubility of chemical compounds" );
dt << New Table Variable( "Notes", "Solubility of chemical compounds" );
dt << Get Table Variable( "Notes" );
"Solubility of chemical compounds"
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
myvar = "This is my version of the JMP Big Class sample data.";
dt << Set Table Variable( "key1", myvar );
dt << Set Table Variable( "key2", myvar );