- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Set Value as Global Variable
Hi,
I want to update a NumberColEditBox in a report using global variables. I have tried various combinations of Eval and Parse, but without success. I am using JMP9.
/*
// This command works:
reportX[ NumberColEditBox( 1 ) ] << Set Values( [ 1, 2, 3, 4 ] );
// These commands do not work, and generate an "Invalid matrix token" error:
a = 1;
b = 2;
c = 3;
d = 4;
reportX[ NumberColEditBox( 1 ) ] << Set Values( [ a, b, c, d ] );
reportX[ NumberColEditBox( 1 ) ] << Set Values( Eval( [ a, b, c, d ] ) );
reportX[ NumberColEditBox( 1 ) ] << Set Values( [ Eval( a) , Eval( b ), Eval( c ), Eval( d ) ] );
reportX[ NumberColEditBox( 1 ) ] << Set Values( Eval( Parse( [ a, b, c, d ] ) ) );
*/
I suspect my problem is with difficulty putting Global Variables into a matrix.
Any help is appreciated! Thanks.
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Set Value as Global Variable
You can evaluate and convert a list into matrix using Matrix(List).
// JMP 9
nw=new window("test", ncb=numbercoleditbox("ncb",[1,1,1,1]));
L={a,b,c,d}={1,2,3,4};
M=matrix(evallist(L));
ncb<<setvalues(M);
// JMP 10
// It's easier in JMP 10 where <<set accepts a list directly.
// Nr of rows also changes automatically in JMP10
nw=new window("test", ncb=numbercoleditbox("ncb",[1]));
L={a,b,c,d}={1,2,3,4};
ncb<<set(L);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Set Value as Global Variable
You can evaluate and convert a list into matrix using Matrix(List).
// JMP 9
nw=new window("test", ncb=numbercoleditbox("ncb",[1,1,1,1]));
L={a,b,c,d}={1,2,3,4};
M=matrix(evallist(L));
ncb<<setvalues(M);
// JMP 10
// It's easier in JMP 10 where <<set accepts a list directly.
// Nr of rows also changes automatically in JMP10
nw=new window("test", ncb=numbercoleditbox("ncb",[1]));
L={a,b,c,d}={1,2,3,4};
ncb<<set(L);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Set Value as Global Variable
Works great. Thanks!