<?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: Create a Column by getting a user input in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Create-a-Column-by-getting-a-user-input/m-p/613476#M81350</link>
    <description>&lt;P&gt;It might be enough if you just change the "," to ";" after your filter = fb &amp;lt;&amp;lt; get text(); line&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);

//Assign Data Table + Delete Column Flag if it already there
dt = Current Data Table();

//Create new window to get data from user
filter = "";
nw = New Window("Flag Creation",
	Border Box(top(50), bottom(100), Left(50), Right(100)),
	H Center Box(Text Box("Input a single Conditon Bin to Flag")),
	Text Box("Condition:"),
	fb = Text Edit Box("bbb"),
	Button Box("Run",
		filter = fb &amp;lt;&amp;lt; get text();
		dt &amp;lt;&amp;lt; New Column("Flag", Numeric, "Continuous", Format("Best", 12), Formula(filter))
	)
);
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;If you want to prevent JMP from continuing script execution when window is open, you can use modal windows for that.&amp;nbsp;&lt;A href="https://www.jmp.com/support/help/en/17.0/#page/jmp/construct-a-modal-window.shtml#" target="_blank"&gt;Construct a Modal Window (jmp.com)&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 17 Mar 2023 06:40:08 GMT</pubDate>
    <dc:creator>jthi</dc:creator>
    <dc:date>2023-03-17T06:40:08Z</dc:date>
    <item>
      <title>Create a Column by getting a user input</title>
      <link>https://community.jmp.com/t5/Discussions/Create-a-Column-by-getting-a-user-input/m-p/613435#M81349</link>
      <description>&lt;PRE&gt;//Assign Data Table + Delete Column Flag if it already there
dt=current data table();

//Create new window to get data from user
filter="";
nw=New Window("Flag Creation",
	border box(top(50),bottom(100),left(50),right(100)),
	H Center Box(Text Box("Input a single Conditon Bin to Flag")),
	Text Box("Condition:"),fb=Text Edit Box("bbb"),
	Button box("Run",
		filter = fb &amp;lt;&amp;lt; get text(),
		dt&amp;lt;&amp;lt;New Column( "Flag",
			Numeric,
			"Continuous",
			Format( "Best", 12 ),
			Formula( filter))
		
		
	)
		
	);&lt;/PRE&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am a new JMP user. I want to create a column with the value from the user input. However, I got trouble getting the value.&lt;/P&gt;&lt;P&gt;There are 3 concerns:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;How can I get the user input and create new column by it? The script cannot run or return any data.&lt;/LI&gt;&lt;LI&gt;I try to put create new column outside of New Window command. It instantly create the new columns without carrying any user input into it. How can I solve it? (since I think that JSL will execute the script line by line.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Jun 2023 16:27:47 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Create-a-Column-by-getting-a-user-input/m-p/613435#M81349</guid>
      <dc:creator>Deimns287</dc:creator>
      <dc:date>2023-06-08T16:27:47Z</dc:date>
    </item>
    <item>
      <title>Re: Create a Column by getting a user input</title>
      <link>https://community.jmp.com/t5/Discussions/Create-a-Column-by-getting-a-user-input/m-p/613476#M81350</link>
      <description>&lt;P&gt;It might be enough if you just change the "," to ";" after your filter = fb &amp;lt;&amp;lt; get text(); line&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);

//Assign Data Table + Delete Column Flag if it already there
dt = Current Data Table();

//Create new window to get data from user
filter = "";
nw = New Window("Flag Creation",
	Border Box(top(50), bottom(100), Left(50), Right(100)),
	H Center Box(Text Box("Input a single Conditon Bin to Flag")),
	Text Box("Condition:"),
	fb = Text Edit Box("bbb"),
	Button Box("Run",
		filter = fb &amp;lt;&amp;lt; get text();
		dt &amp;lt;&amp;lt; New Column("Flag", Numeric, "Continuous", Format("Best", 12), Formula(filter))
	)
);
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;If you want to prevent JMP from continuing script execution when window is open, you can use modal windows for that.&amp;nbsp;&lt;A href="https://www.jmp.com/support/help/en/17.0/#page/jmp/construct-a-modal-window.shtml#" target="_blank"&gt;Construct a Modal Window (jmp.com)&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 17 Mar 2023 06:40:08 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Create-a-Column-by-getting-a-user-input/m-p/613476#M81350</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2023-03-17T06:40:08Z</dc:date>
    </item>
  </channel>
</rss>

