enter value in specific cell<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />Hello,
new little problem.
I would like to enter a value in a specific cell by
1) row name
2) column name
for example
I would like to enter value 25 in cell
row (from col1) = 4
col = SYN
best regards
Lionel
Re: enter value in specific cellIt works!
Thanks
Re: enter value in specific cellA JMP List is not one of the elements that can be defined for a data type for a column. However, you can save the list as a character string, and write it to a character column. Also, I believe that all you need to do to make your script work, is to use the Char() function to change the result from << get keys into a string
unique_vals = {};
unique_vals = Associative Array(dt:Test_Values) << Get Keys;
Column(dtout,"Col")[31] = Char( unique vals );Re: enter value in specific cellLooking for help to assign list values to a cell.
I have a list obtained by using associative arrays on a column.
The number of values in the list is not known beforehand.Need to assign all values in the list to one specific cell.
So far I have tried this -
unique_vals = {};
unique_vals = Associative Array(dt:Test_Values) << Get Keys;
Column(dtout,"Col")[31] = unique vals;
But getting an error as follows -
Column "Col" requires character values{1} in access or evaluation of 'Bad Argument'
If I use Column(dtout,"Col")[31] = unique vals[1];the error goes away but I need to assign all items in the list to that cell.
Any help appreciated.
Re: enter value in specific cellthank you very for your time explaining me my mistakes.
Learning from it
Re: enter value in specific cellIt doesn't have to be word. Any text editor that supports formatting, for example, I often copy and paste it into an email message since I always have Outlook open, but rarely have Word open.
Also here is how you would get your code working: (Just an example in debugging)
First, i=3 isn't a Boolean, if you meant i==3, this would never evaluate to true since i=2. So I made the assumption you meant i<=3.
Next, you change my_list from a list to a number, so you need to reflect that in the for loop. my_list becomes my_list.
Lastly, you need to be aware of the order of operations. dt:column_name This will first query the dt namespace to find a variable column_name. It just so happens that there is indeed a column named name. So then the will find the row in the column name, thus dt:column_name[1] == "KATIE", dt:column_name[2] == "LOUISE", ect. However, your script will then die since "KATIE" is not a list or matrix, and there are no subscripts sokills it. To keep order of operations correct you could simply change the code to below. Alternatively you could use the column function to remove ambiguity. Column(dt, i), or Column(dt, column_name) (which happen to be the same in this case since your column_name list is every column in the data table.)
column_name = dt << get column names();
//my_list = {10, 20};
my_list = 555;
for(i=2, i<=3, i++,
r = dt << Get Rows Where( :name == "LOUISE" );
dt:(column_name[i])[r] = my_list;
);
Re: enter value in specific cell>> BTW,
>> how do you do to copy JSL code keeping color just like in JMP?
Copy/paste the code from the JSL script editor into MS-Word.
Copy/paste the code from MS-Word to this forum.
// JSL Script
a = {"Hello", "World"};
Re: enter value in specific celltrying to fill in value for certain column by row where row represents working weeks
so kind of weekly update record table.
ok it works! thank you. Also it is a good learning for me on how to manipulate table and data 
BTW,
how do you do to copy JSL code keeping color just like in JMP?
Re: enter value in specific cellHi llupo0,
What are you trying to accomplish with your script? I think this may be closer to what you are trying to do.
dt = New Table( "Little Class",
Add Rows( 3 ),
New Column( "name", Character, "Nominal", Set Values( {"KATIE", "LOUISE", "JANE"} ) ),
New Column( "height", "Continuous", Set Values( [59, 61, 55] ) ),
New Column( "weight", "Continuous", Set Values( [100, 150, 200] ) )
);
column_name = dt << get column names();
my_list = {62, 151};
For( i = 2, i <= N Items( column_name ), i++, // Add < sign.
r = dt << Get Rows Where( :name == "LOUISE" );
Column( i )[r] = my_list[i - 1]; // my_list has only two values, thus index [i - 1] is used for i = 3.
);
Re: enter value in specific cellMorning Robot
thank you for your feedback.
I see how you addressed the row. So in the same way I can also with a for loop have column movement.
tried but doesnt work 
dt = New Table( "Little Class",
Add Rows( 3 ),
New Column( "name", Character, "Nominal", Set Values( {"KATIE", "LOUISE", "JANE"} ) ),
New Column( "height", "Continuous", Set Values( [59, 61, 55] ) ),
New Column( "weight", "Continuous", Set Values( [100, 150, 200] ) ),
);
column_name = dt << get column names();
//my_list = {10, 20};
my_list = 777;
for(i=2, i=3, i++,
r = dt << Get Rows Where( :name == "LOUISE" );
dt:column_name= my_list
);
Re: enter value in specific cellHi llupo0,
Try this:
// Create example table.
dt = New Table( "Little Class",
Add Rows( 3 ),
New Column( "name", Character, "Nominal", Set Values( {"KATIE", "LOUISE", "JANE"} ) ),
New Column( "height", "Continuous", Set Values( [59, 61, 55] ) )
);
// Update value from row number.
dt:height[2] = 62;
// Update value from column value.
r = dt << Get Rows Where( :name == "LOUISE" );
dt:height[r] = 63;