<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: User Entered Values to Column values using JSL in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/User-Entered-Values-to-Column-values-using-JSL/m-p/225778#M44813</link>
    <description>&lt;P&gt;Thank you for the help but I'm getting an error, where am I going wrong?&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt &amp;lt;&amp;lt; New Column("Sample Number",Character,Formula(Left(:Sample, Length(:Sample) - 1)),EvalFormula);
dt = current data table();

Names Default To Here( 1 );

InputWindow = New Window( "Enter Input",
	&amp;lt;&amp;lt;modal(),
	Table Box(
		String Col Box( "Sample Number",
			{"Sample 01", "Sample 02", "Sample 03", "Sample 04", "Sample 05",
			"Sample 06"}
		),
		Col Box(
			"Sample Names",
			teb1 = Text Edit Box( "Enter Sample Name" ),
			teb2 = Text Edit Box( "Enter Sample Name" ),
			teb3 = Text Edit Box( "Enter Sample Name" ),
			teb4 = Text Edit Box( "Enter Sample Name" ),
			teb5 = Text Edit Box( "Enter Sample Name" ),
			teb6 = Text Edit Box( "Enter Sample Name" )			
		)
	),
	Button Box( "OK",
		sample name 1 = teb1 &amp;lt;&amp;lt; Get Text;
		sample name 2 = teb2 &amp;lt;&amp;lt; Get Text;
		sample name 3 = teb3 &amp;lt;&amp;lt; Get Text;
		sample name 4 = teb4 &amp;lt;&amp;lt; Get Text;
		sample name 5 = teb5 &amp;lt;&amp;lt; Get Text;
		sample name 6 = teb6 &amp;lt;&amp;lt; Get Text;
	)
);

Show(
	sample name 1,
	sample name 2,
	sample name 3,
	sample name 4,
	sample name 5,
	sample name 6,
);

dt = current data table();
// Sort the samples by sample name
Sample Number&amp;lt;&amp;lt;set property(value ordering, {teb1, teb2, teb3, teb4, teb5, teb6});
dt &amp;lt;&amp;lt; Sort(By(Sample Number),Order(Ascending),Replace Table);&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Fri, 13 Sep 2019 23:05:15 GMT</pubDate>
    <dc:creator>shah47</dc:creator>
    <dc:date>2019-09-13T23:05:15Z</dc:date>
    <item>
      <title>User Entered Values to Column values using JSL</title>
      <link>https://community.jmp.com/t5/Discussions/User-Entered-Values-to-Column-values-using-JSL/m-p/39229#M22935</link>
      <description>&lt;P&gt;I am new to JSL Scripting.&lt;/P&gt;&lt;P&gt;I am trying to populate a column using entries from a panel box.&lt;/P&gt;&lt;P&gt;In part of my code below, I am trying to get the value entered ,34, to populate a column named Price Code. However, when I run this code an empty column is returned.&lt;/P&gt;&lt;P&gt;I have tried using &lt;STRONG&gt;Get Values (Num)&lt;/STRONG&gt; in place of &lt;STRONG&gt;Set Values(Num)&lt;/STRONG&gt; and I still get an empty Price Code column.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dataTable = New Table( "Data Table",
Add Rows( 3 ),
New Column( "Customer Name",
Character,
"Nominal",
Set Values( {"Jane", "Scott", "Abby"} )
),
New Column( "Dollar Amount",
"Continuous",
Set Values( [2002, 1323, 1954] )
)
);

popUp = New Window ("Number", &amp;lt;&amp;lt; modal(),
        Panel Box("Enter a Number", lineup box ( N col (1)),
            number = Number edit box (34), ),
        Panel Box ("Actions", H List Box (  Button Box ("OK", keep_going = 1;                    
                    Num = :number &amp;lt;&amp;lt; Get;),
           Button Box ("Cancel", keep_going = 0)   ),   ),
);

dataTable &amp;lt;&amp;lt; New Column("Price Code",Numeric, "Continuous", Set Values(Num));&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 14 May 2017 15:06:55 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/User-Entered-Values-to-Column-values-using-JSL/m-p/39229#M22935</guid>
      <dc:creator>adel922</dc:creator>
      <dc:date>2017-05-14T15:06:55Z</dc:date>
    </item>
    <item>
      <title>Re: User Entered Values to Column values using JSL</title>
      <link>https://community.jmp.com/t5/Discussions/User-Entered-Values-to-Column-values-using-JSL/m-p/39230#M22936</link>
      <description>&lt;P&gt;This is a simple 2 issue problem. &amp;nbsp;&lt;/P&gt;
&lt;P&gt;1. &amp;nbsp;When you referenced&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Num = :number &amp;lt;&amp;lt; Get;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;You are scoping the variable number wrong, ":" in front of the variable, tells JSL to look for a column named "Number" in a data table. &amp;nbsp;If you either leave it blank, or specify "::" it will look for a memory variable.&lt;/P&gt;
&lt;P&gt;2. &amp;nbsp;If you want the scaler value from the memory variable "NUM" to be populated in all rows of the table you need to specify:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dataTable &amp;lt;&amp;lt; New Column( "Price Code", Numeric, "Continuous", Set each Value( Num ) );&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;So the complete script would be:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dataTable = New Table( "Data Table",
	Add Rows( 3 ),
	New Column( "Customer Name", Character, "Nominal", Set Values( {"Jane", "Scott", "Abby"} ) ),
	New Column( "Dollar Amount", "Continuous", Set Values( [2002, 1323, 1954] ) )
);

popUp = New Window( "Number",
	&amp;lt;&amp;lt;modal(),
	Panel Box( "Enter a Number", Lineup Box( N Col( 1 ) ), number = Number Edit Box( 34 ) ),
	Panel Box( "Actions",
		H List Box(
			Button Box( "OK",
				keep_going = 1;
				Num = number &amp;lt;&amp;lt; Get;
			),
			Button Box( "Cancel", keep_going = 0 )
		), 

	), 

);

dataTable &amp;lt;&amp;lt; New Column( "Price Code", Numeric, "Continuous", Set each Value( Num ) );&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 14 May 2017 17:10:09 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/User-Entered-Values-to-Column-values-using-JSL/m-p/39230#M22936</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2017-05-14T17:10:09Z</dc:date>
    </item>
    <item>
      <title>Re: User Entered Values to Column values using JSL</title>
      <link>https://community.jmp.com/t5/Discussions/User-Entered-Values-to-Column-values-using-JSL/m-p/39231#M22937</link>
      <description>&lt;P&gt;Thank you so much&amp;nbsp;&lt;A href="https://community.jmp.com/t5/user/viewprofilepage/user-id/2687" target="_blank"&gt;txnelson&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 14 May 2017 23:04:18 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/User-Entered-Values-to-Column-values-using-JSL/m-p/39231#M22937</guid>
      <dc:creator>adel922</dc:creator>
      <dc:date>2017-05-14T23:04:18Z</dc:date>
    </item>
    <item>
      <title>Re: User Entered Values to Column values using JSL</title>
      <link>https://community.jmp.com/t5/Discussions/User-Entered-Values-to-Column-values-using-JSL/m-p/39232#M22938</link>
      <description>&lt;P&gt;Thank you so much&amp;nbsp;&lt;A href="https://community.jmp.com/t5/user/viewprofilepage/user-id/2687" target="_blank"&gt;txnelson&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Sun, 14 May 2017 23:03:54 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/User-Entered-Values-to-Column-values-using-JSL/m-p/39232#M22938</guid>
      <dc:creator>adel922</dc:creator>
      <dc:date>2017-05-14T23:03:54Z</dc:date>
    </item>
    <item>
      <title>Re: User Entered Values to Column values using JSL</title>
      <link>https://community.jmp.com/t5/Discussions/User-Entered-Values-to-Column-values-using-JSL/m-p/225672#M44807</link>
      <description>&lt;P&gt;I was wondering in regards to this solution, how would I go about getting the input from the user in regards to sample name and set that as my sample number?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt &amp;lt;&amp;lt; New Column("Sample Number",Character,Formula(Left(:Sample, Length(:Sample) - 1)),EvalFormula);


InputWindow = New Window( "Enter Input", &amp;lt;&amp;lt;modal(),
V List Box(Align(center),
Panel Box( "Enter Sample Name for Sample 01", Lineup Box( N Col( 1 ) ), number = Text Edit Box( "Enter Sample Name" )),
Panel Box( "Enter Sample Name for Sample 02", Lineup Box( N Col( 1 ) ), number = Text Edit Box( "Enter Sample Name" )),
Panel Box( "Enter Sample Name for Sample 03", Lineup Box( N Col( 1 ) ), number = Text Edit Box( "Enter Sample Name" )),
Panel Box( "Enter Sample Name for Sample 04", Lineup Box( N Col( 1 ) ), number = Text Edit Box( "Enter Sample Name" )),
Panel Box( "Enter Sample Name for Sample 05", Lineup Box( N Col( 1 ) ), number = Text Edit Box( "Enter Sample Name" )),
Panel Box( "Enter Sample Name for Sample 06", Lineup Box( N Col( 1 ) ), number = Text Edit Box(&amp;nbsp;
Panel Box( "Actions",
H List Box(
Button Box( "OK", keep_going = 1; 
text = :text &amp;lt;&amp;lt; Get;),

),
Button Box( "Cancel", keep_going = 0 )
),

),

);

// Sort the samples by sample name
Sample Number&amp;lt;&amp;lt;set property(value ordering, {"01","02","03","04","05","06"});
dt &amp;lt;&amp;lt; Sort(By(Sample Number),Order(Ascending),Replace Table);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 13 Sep 2019 14:40:52 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/User-Entered-Values-to-Column-values-using-JSL/m-p/225672#M44807</guid>
      <dc:creator>shah47</dc:creator>
      <dc:date>2019-09-13T14:40:52Z</dc:date>
    </item>
    <item>
      <title>Re: User Entered Values to Column values using JSL</title>
      <link>https://community.jmp.com/t5/Discussions/User-Entered-Values-to-Column-values-using-JSL/m-p/225673#M44808</link>
      <description>&lt;P&gt;I think you could make a cleaner and simpler UI with a Table Box() organizing a String Col Box() for the labels and a V List() of Text Edit Box() for the input values.&lt;/P&gt;</description>
      <pubDate>Fri, 13 Sep 2019 15:13:24 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/User-Entered-Values-to-Column-values-using-JSL/m-p/225673#M44808</guid>
      <dc:creator>Mark_Bailey</dc:creator>
      <dc:date>2019-09-13T15:13:24Z</dc:date>
    </item>
    <item>
      <title>Re: User Entered Values to Column values using JSL</title>
      <link>https://community.jmp.com/t5/Discussions/User-Entered-Values-to-Column-values-using-JSL/m-p/225674#M44809</link>
      <description>&lt;P&gt;Something like this? But how would you replace the sample number with the user input for sample name?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;// Create a new column for sample names
dt &amp;lt;&amp;lt; New Column("Sample Number",Character,Formula(Left(:Sample, Length(:Sample) - 1)),EvalFormula);
dt = current data table();

InputWindow = New Window( "Enter Input", &amp;lt;&amp;lt;modal(),
Table Box(
		String Col Box( "Sample Number",
			{"Sample 01", "Sample 02", "Sample 03", "Sample 04", "Sample 05", "Sample 06"}
		),
		Col Box(
			"Sample Names",
			Text Edit Box( "Enter Sample Name"),
			Text Edit Box( "Enter Sample Name"),
			Text Edit Box( "Enter Sample Name"),
			Text Edit Box( "Enter Sample Name"),
			Text Edit Box( "Enter Sample Name"),
			Text Edit Box( "Enter Sample Name"),
			
		)));
	




// Sort the samples by sample name
Sample Number&amp;lt;&amp;lt;set property(value ordering, {"01","02","03","04","05","06"});
dt &amp;lt;&amp;lt; Sort(By(Sample Number),Order(Ascending),Replace Table);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 13 Sep 2019 15:51:50 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/User-Entered-Values-to-Column-values-using-JSL/m-p/225674#M44809</guid>
      <dc:creator>shah47</dc:creator>
      <dc:date>2019-09-13T15:51:50Z</dc:date>
    </item>
    <item>
      <title>Re: User Entered Values to Column values using JSL</title>
      <link>https://community.jmp.com/t5/Discussions/User-Entered-Values-to-Column-values-using-JSL/m-p/225681#M44811</link>
      <description>&lt;P&gt;Here is one way:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );

InputWindow = New Window( "Enter Input",
	&amp;lt;&amp;lt;modal(),
	Table Box(
		String Col Box( "Sample Number",
			{"Sample 01", "Sample 02", "Sample 03", "Sample 04", "Sample 05",
			"Sample 06"}
		),
		Col Box(
			"Sample Names",
			teb1 = Text Edit Box( "Enter Sample Name" ),
			teb2 = Text Edit Box( "Enter Sample Name" ),
			teb3 = Text Edit Box( "Enter Sample Name" ),
			teb4 = Text Edit Box( "Enter Sample Name" ),
			teb5 = Text Edit Box( "Enter Sample Name" ),
			teb6 = Text Edit Box( "Enter Sample Name" )			
		)
	),
	Button Box( "OK",
		sample name 1 = teb1 &amp;lt;&amp;lt; Get Text;
		sample name 2 = teb2 &amp;lt;&amp;lt; Get Text;
		sample name 3 = teb3 &amp;lt;&amp;lt; Get Text;
		sample name 4 = teb4 &amp;lt;&amp;lt; Get Text;
		sample name 5 = teb5 &amp;lt;&amp;lt; Get Text;
		sample name 6 = teb6 &amp;lt;&amp;lt; Get Text;
	)
);

Show(
	sample name 1,
	sample name 2,
	sample name 3,
	sample name 4,
	sample name 5,
	sample name 6,
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 13 Sep 2019 18:17:59 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/User-Entered-Values-to-Column-values-using-JSL/m-p/225681#M44811</guid>
      <dc:creator>Mark_Bailey</dc:creator>
      <dc:date>2019-09-13T18:17:59Z</dc:date>
    </item>
    <item>
      <title>Re: User Entered Values to Column values using JSL</title>
      <link>https://community.jmp.com/t5/Discussions/User-Entered-Values-to-Column-values-using-JSL/m-p/225778#M44813</link>
      <description>&lt;P&gt;Thank you for the help but I'm getting an error, where am I going wrong?&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt &amp;lt;&amp;lt; New Column("Sample Number",Character,Formula(Left(:Sample, Length(:Sample) - 1)),EvalFormula);
dt = current data table();

Names Default To Here( 1 );

InputWindow = New Window( "Enter Input",
	&amp;lt;&amp;lt;modal(),
	Table Box(
		String Col Box( "Sample Number",
			{"Sample 01", "Sample 02", "Sample 03", "Sample 04", "Sample 05",
			"Sample 06"}
		),
		Col Box(
			"Sample Names",
			teb1 = Text Edit Box( "Enter Sample Name" ),
			teb2 = Text Edit Box( "Enter Sample Name" ),
			teb3 = Text Edit Box( "Enter Sample Name" ),
			teb4 = Text Edit Box( "Enter Sample Name" ),
			teb5 = Text Edit Box( "Enter Sample Name" ),
			teb6 = Text Edit Box( "Enter Sample Name" )			
		)
	),
	Button Box( "OK",
		sample name 1 = teb1 &amp;lt;&amp;lt; Get Text;
		sample name 2 = teb2 &amp;lt;&amp;lt; Get Text;
		sample name 3 = teb3 &amp;lt;&amp;lt; Get Text;
		sample name 4 = teb4 &amp;lt;&amp;lt; Get Text;
		sample name 5 = teb5 &amp;lt;&amp;lt; Get Text;
		sample name 6 = teb6 &amp;lt;&amp;lt; Get Text;
	)
);

Show(
	sample name 1,
	sample name 2,
	sample name 3,
	sample name 4,
	sample name 5,
	sample name 6,
);

dt = current data table();
// Sort the samples by sample name
Sample Number&amp;lt;&amp;lt;set property(value ordering, {teb1, teb2, teb3, teb4, teb5, teb6});
dt &amp;lt;&amp;lt; Sort(By(Sample Number),Order(Ascending),Replace Table);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 13 Sep 2019 23:05:15 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/User-Entered-Values-to-Column-values-using-JSL/m-p/225778#M44813</guid>
      <dc:creator>shah47</dc:creator>
      <dc:date>2019-09-13T23:05:15Z</dc:date>
    </item>
    <item>
      <title>Re: User Entered Values to Column values using JSL</title>
      <link>https://community.jmp.com/t5/Discussions/User-Entered-Values-to-Column-values-using-JSL/m-p/225780#M44814</link>
      <description>What is error message in the log?</description>
      <pubDate>Sat, 14 Sep 2019 01:36:53 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/User-Entered-Values-to-Column-values-using-JSL/m-p/225780#M44814</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2019-09-14T01:36:53Z</dc:date>
    </item>
    <item>
      <title>Re: User Entered Values to Column values using JSL</title>
      <link>https://community.jmp.com/t5/Discussions/User-Entered-Values-to-Column-values-using-JSL/m-p/225796#M44816</link>
      <description>&lt;P&gt;Sorry I should rephrase that, there is no error message but the sample names in the data table are not being replaced with the user input&lt;/P&gt;</description>
      <pubDate>Sat, 14 Sep 2019 15:30:56 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/User-Entered-Values-to-Column-values-using-JSL/m-p/225796#M44816</guid>
      <dc:creator>shah47</dc:creator>
      <dc:date>2019-09-14T15:30:56Z</dc:date>
    </item>
    <item>
      <title>Re: User Entered Values to Column values using JSL</title>
      <link>https://community.jmp.com/t5/Discussions/User-Entered-Values-to-Column-values-using-JSL/m-p/225813#M44818</link>
      <description>&lt;P&gt;Not being able to see your sample data table, I am not completly sure what the issue is, but for sure, the main issue is that you are not doing anything to write the values from the input screen to the data&amp;nbsp; table.&amp;nbsp; Below is a modification of your code that writes the values to the data table&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;
Names Default To Here( 1 );
dt=open("$SAMPLE_DATA/big class.jmp");
dt&amp;lt;&amp;lt;new column("Sample",character);
dt &amp;lt;&amp;lt; New Column("Sample Number",Character,Formula(Left(:Sample, Length(:Sample) - 1)),EvalFormula);
dt = current data table();
InputWindow = New Window( "Enter Input",
	&amp;lt;&amp;lt;modal(),
	Table Box(
		String Col Box( "Sample Number",
			{"Sample 01", "Sample 02", "Sample 03", "Sample 04", "Sample 05",
			"Sample 06"}
		),
		Col Box(
			"Sample Names",
			teb1 = Text Edit Box( "Enter Sample Name" ),
			teb2 = Text Edit Box( "Enter Sample Name" ),
			teb3 = Text Edit Box( "Enter Sample Name" ),
			teb4 = Text Edit Box( "Enter Sample Name" ),
			teb5 = Text Edit Box( "Enter Sample Name" ),
			teb6 = Text Edit Box( "Enter Sample Name" )			
		)
	),
	Button Box( "OK",
		sample name 1 = teb1 &amp;lt;&amp;lt; Get Text;
		sample name 2 = teb2 &amp;lt;&amp;lt; Get Text;
		sample name 3 = teb3 &amp;lt;&amp;lt; Get Text;
		sample name 4 = teb4 &amp;lt;&amp;lt; Get Text;
		sample name 5 = teb5 &amp;lt;&amp;lt; Get Text;
		sample name 6 = teb6 &amp;lt;&amp;lt; Get Text;
	)
);

Show(
	sample name 1,
	sample name 2,
	sample name 3,
	sample name 4,
	sample name 5,
	sample name 6,
);


:sample[1]=sample name 1;
:sample[2]=sample name 2;
:sample[3]=sample name 3;
:sample[4]=sample name 4;
:sample[5]=sample name 5;
:sample[6]=sample name 6;

dt = current data table();
// Sort the samples by sample name
Sample Number&amp;lt;&amp;lt;set property(value ordering, {teb1, teb2, teb3, teb4, teb5, teb6});
dt &amp;lt;&amp;lt; Sort(By(Sample Number),Order(Ascending),Replace Table);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 14 Sep 2019 23:09:54 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/User-Entered-Values-to-Column-values-using-JSL/m-p/225813#M44818</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2019-09-14T23:09:54Z</dc:date>
    </item>
    <item>
      <title>Re: User Entered Values to Column values using JSL</title>
      <link>https://community.jmp.com/t5/Discussions/User-Entered-Values-to-Column-values-using-JSL/m-p/225838#M44825</link>
      <description>&lt;P&gt;Thanks so much for your help, here's my full script, I still cannot get teb1, teb2,... etc to replace sample number 01, 02,...etc. In the current script, the user input just seems to replace the values of sample name and sample number in the first row, second row etc. I would like the user input to replace sample number 01, 02, 03, 04, 05, 06 etc&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt=New Table();
dt=current data table();

current data table() &amp;lt;&amp;lt; Bring Window To Front;
Wait(0);
Main Menu("Paste With Column Names");

// Change the column name
Col1=column("X-Value");
Col1&amp;lt;&amp;lt;set name("Cycle");
Col2=column("Y-Value");
Col2&amp;lt;&amp;lt;set name("Response");

// Create a new column for sample names
dt &amp;lt;&amp;lt; New Column("Sample Number",Character,Formula(Left(:Sample, Length(:Sample) - 1)),EvalFormula);
dt = current data table();

Names Default To Here( 1 );

InputWindow = New Window( "Enter Input",
	&amp;lt;&amp;lt;modal(),
	Table Box(
		String Col Box( "Sample Number",
			{"Sample Number 01", "Sample Number 02", "Sample Number 03", "Sample Number 04", "Sample Number 05",
			"Sample Number 06"}
		),
		Col Box(
			"Sample Number",
			teb1 = Text Edit Box( "Enter Sample Name" ),
			teb2 = Text Edit Box( "Enter Sample Name" ),
			teb3 = Text Edit Box( "Enter Sample Name" ),
			teb4 = Text Edit Box( "Enter Sample Name" ),
			teb5 = Text Edit Box( "Enter Sample Name" ),
			teb6 = Text Edit Box( "Enter Sample Name" )			
		)
	),
	Button Box( "OK",
		Sample Number 1 = teb1 &amp;lt;&amp;lt; Get Text;
		Sample Number 2 = teb2 &amp;lt;&amp;lt; Get Text;
		Sample Number 3 = teb3 &amp;lt;&amp;lt; Get Text;
		Sample Number 4 = teb4 &amp;lt;&amp;lt; Get Text;
		Sample Number 5 = teb5 &amp;lt;&amp;lt; Get Text;
		Sample Number 6 = teb6 &amp;lt;&amp;lt; Get Text;
	)
);

Show(
	Sample Number 1,
	Sample Number 2,
	Sample Number 3,
	Sample Number 4,
	Sample Number 5,
	Sample Number 6,
);


:sample number[1]=Sample Number 1;
:sample number[2]=Sample Number 2;
:sample number[3]=Sample Number 3;
:sample number[4]=Sample Number 4;
:sample number[5]=Sample Number 5;
:sample number[6]=Sample Number 6;


// Sort the samples by sample name
Sample Number&amp;lt;&amp;lt;set property(value ordering, {"Running Buffer","Std 01","Std 02","Std 03","Std 04","Std 05","Ctrl",teb1,teb2,teb3,teb4,teb5,teb6,
"07","08","09","10","11","12","13","14","15","16","17","18","19","20"});
dt &amp;lt;&amp;lt; Sort(By(Sample Number),Order(Ascending),Replace Table);

// Exclude and delete any Startup Buffers and Startup Reference Samples; Cycle 1-9
dt &amp;lt;&amp;lt; Select Where( Cycle &amp;lt;= 9);
dt &amp;lt;&amp;lt; Exclude;
dt &amp;lt;&amp;lt; Delete Rows;

win = New Window( "Graph", text = TextEditBox("Change Me"), text &amp;lt;&amp;lt; Set Font( "Arial Black" ), text &amp;lt;&amp;lt; Font Color( black ), text &amp;lt;&amp;lt; Enable( 1 );

dt &amp;lt;&amp;lt; Select Where( Sample Number != "Running Buffer");
dt &amp;lt;&amp;lt; Exclude;
dt &amp;lt;&amp;lt; Hide;
summarize(Bline=mean(:Response)); 
dt &amp;lt;&amp;lt; Clear Row States;
dt &amp;lt;&amp;lt; New Column("Blank Subtracted Response",Numeric,Formula((Response-Bline)),EvalFormula);

// Bivariated plot. 

biv = Bivariate(Y( :Blank Subtracted Response ), X( :Cycle ) );
Report( biv )[Frame Box(1)] &amp;lt;&amp;lt; Row Legend( Sample Number, color(1), marker(1), Marker Theme( "Solid" ));

dt &amp;lt;&amp;lt; Select Where( Sample Number != "Std 03");
dt &amp;lt;&amp;lt; Exclude;
dt &amp;lt;&amp;lt; Hide;

Current Data Table(dt);
dt &amp;lt;&amp;lt; Clear Row States;

// Normalize the data
dt &amp;lt;&amp;lt; New Column("Normalized Response",Numeric,Formula(Blank Subtracted Response/Predicted Blank Subtracted Response*100),EvalFormula);

biv = Bivariate(Y( :Normalized Response ), X( :Cycle ) );
Report( biv )[Frame Box(1)] &amp;lt;&amp;lt; Row Legend( Sample Number, color(1), marker(1), Marker Theme( "Solid" ));

// Create table of reportable results
Oneway(
	Y( :Normalized Response  ),
	X( :Sample Number ),
	Means and Std Dev( 1 ),
	Mean Lines( 1 ),
	Mean Error Bars( 1 ),
	Std Dev Lines( 1 ),
	Points Spread( 1 ),
	Grand Mean( 0 ));&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 15 Sep 2019 15:42:04 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/User-Entered-Values-to-Column-values-using-JSL/m-p/225838#M44825</guid>
      <dc:creator>shah47</dc:creator>
      <dc:date>2019-09-15T15:42:04Z</dc:date>
    </item>
    <item>
      <title>Re: User Entered Values to Column values using JSL</title>
      <link>https://community.jmp.com/t5/Discussions/User-Entered-Values-to-Column-values-using-JSL/m-p/225842#M44827</link>
      <description>Just to update, the I got the values in the table to be replaced with the user input by actually specifying the row but the script seems to end there. It does not "Sort the samples by name"</description>
      <pubDate>Sun, 15 Sep 2019 23:18:09 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/User-Entered-Values-to-Column-values-using-JSL/m-p/225842#M44827</guid>
      <dc:creator>shah47</dc:creator>
      <dc:date>2019-09-15T23:18:09Z</dc:date>
    </item>
    <item>
      <title>Re: User Entered Values to Column values using JSL</title>
      <link>https://community.jmp.com/t5/Discussions/User-Entered-Values-to-Column-values-using-JSL/m-p/225843#M44828</link>
      <description>You are not scoping the reference properly.  You reference the column Sample Number as:&lt;BR /&gt;     :Sample Number&lt;BR /&gt;Please take the time to read the Scripting Guide to round out your knowledge of the components of JSL.&lt;BR /&gt;     Help==&amp;gt;Books==&amp;gt;Scripting Guide</description>
      <pubDate>Mon, 16 Sep 2019 00:48:22 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/User-Entered-Values-to-Column-values-using-JSL/m-p/225843#M44828</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2019-09-16T00:48:22Z</dc:date>
    </item>
    <item>
      <title>Re: User Entered Values to Column values using JSL</title>
      <link>https://community.jmp.com/t5/Discussions/User-Entered-Values-to-Column-values-using-JSL/m-p/226030#M44850</link>
      <description>&lt;P&gt;Slightly different approach to fix your original script&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );

dt = current data table();
dt &amp;lt;&amp;lt; New Column("Sample Number",Character,Formula(Left(:Sample, Length(:Sample) - 1)),EvalFormula);

InputWindow = New Window( "Enter Input",
	&amp;lt;&amp;lt;modal(),
	Table Box(
		String Col Box( "Sample Number",
			{"Sample 01", "Sample 02", "Sample 03", "Sample 04", "Sample 05",
			"Sample 06"}
		),
		Col Box(
			"Sample Names",
			teb1 = Text Edit Box( "Enter Sample Name" ),
			teb2 = Text Edit Box( "Enter Sample Name" ),
			teb3 = Text Edit Box( "Enter Sample Name" ),
			teb4 = Text Edit Box( "Enter Sample Name" ),
			teb5 = Text Edit Box( "Enter Sample Name" ),
			teb6 = Text Edit Box( "Enter Sample Name" )			
		)
	),
	Button Box( "OK",
		s1 = teb1 &amp;lt;&amp;lt; Get Text;
		s2 = teb2 &amp;lt;&amp;lt; Get Text;
		s3 = teb3 &amp;lt;&amp;lt; Get Text;
		s4 = teb4 &amp;lt;&amp;lt; Get Text;
		s5 = teb5 &amp;lt;&amp;lt; Get Text;
		s6 = teb6 &amp;lt;&amp;lt; Get Text;
		sample_list = eval list({s1, s2, s3, s4, s5, s6});
	)
);

Show(sample_list);

// Sort the samples by sample name
dt:Sample Number&amp;lt;&amp;lt;set property(value ordering, sample_list);
dt &amp;lt;&amp;lt; Sort(By(:Sample Number), Order(Ascending), Replace Table);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 16 Sep 2019 20:37:36 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/User-Entered-Values-to-Column-values-using-JSL/m-p/226030#M44850</guid>
      <dc:creator>pmroz</dc:creator>
      <dc:date>2019-09-16T20:37:36Z</dc:date>
    </item>
    <item>
      <title>Re: User Entered Values to Column values using JSL</title>
      <link>https://community.jmp.com/t5/Discussions/User-Entered-Values-to-Column-values-using-JSL/m-p/226347#M44905</link>
      <description>&lt;P&gt;Thanks all, I was wondering if I wanted to subsitutute a string in a column named sample, why won't the following script work?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;myCol = dt  &amp;lt;&amp;lt; Column ("sample");

substitute into(myCol, "01a", s1);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 18 Sep 2019 21:42:08 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/User-Entered-Values-to-Column-values-using-JSL/m-p/226347#M44905</guid>
      <dc:creator>shah47</dc:creator>
      <dc:date>2019-09-18T21:42:08Z</dc:date>
    </item>
    <item>
      <title>Re: User Entered Values to Column values using JSL</title>
      <link>https://community.jmp.com/t5/Discussions/User-Entered-Values-to-Column-values-using-JSL/m-p/226406#M44917</link>
      <description>&lt;P&gt;I was able to solve my problem wtih the following&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Try( :Sample[dt &amp;lt;&amp;lt; get rows where( :Sample== "01a" )] = s1 );&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 19 Sep 2019 14:13:06 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/User-Entered-Values-to-Column-values-using-JSL/m-p/226406#M44917</guid>
      <dc:creator>shah47</dc:creator>
      <dc:date>2019-09-19T14:13:06Z</dc:date>
    </item>
  </channel>
</rss>

