<?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: Set user in put as new variable in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Set-user-in-put-as-new-variable/m-p/471399#M71581</link>
    <description>&lt;P&gt;Check out the log, what does&lt;/P&gt;
&lt;PRE class="language-jsl"&gt;&lt;CODE&gt;					show(date_val);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;print?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;With the date issue could also be with this format:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Format("y/m/d h:m:s"),&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;JMP can be a bit finnicky with formats from time to time. You could remove the formatting from the "b" column and see if it fills the row with datenum value. Then you can try to see which formats you have available from format menu.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jthi_0-1647677700701.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/40963iA7145681D23C6706/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jthi_0-1647677700701.png" alt="jthi_0-1647677700701.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jthi_1-1647677712418.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/40964iE29246C1A813D532/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jthi_1-1647677712418.png" alt="jthi_1-1647677712418.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 19 Mar 2022 08:15:19 GMT</pubDate>
    <dc:creator>jthi</dc:creator>
    <dc:date>2022-03-19T08:15:19Z</dc:date>
    <item>
      <title>Set user in put as new variable</title>
      <link>https://community.jmp.com/t5/Discussions/Set-user-in-put-as-new-variable/m-p/471352#M71574</link>
      <description>&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am looking to create a script which takes a user input and outputs these inputs into a data table.&amp;nbsp;&lt;/P&gt;&lt;P&gt;My script below outputs a data table but does not insert the user variables, would someone be able to help as I think I may be misunderstanding how to insert it.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;v1 = text = " ID"; // two numbers with default

w = New Window( "Synch Request", // opens a window with a title and this content...
    Border Box( top( 20 ), bottom( 20 ), Left( 20 ), Right( 20 ), // window dressing 
        V List Box( // V and H lists nest to organize the display boxes
            H Center Box( Text Box( "Please select the tool you wish to view and the date to view from" ) ), // a second title, centered
            Spacer Box( size( 1, 30 ) ), // a little vertical space
            H List Box( Text Box( "Tool: " ), tool = Text Edit Box( v1 ) ), // data entry
            Spacer Box( size( 1, 10 ) ), // a little vertical space
            H List Box( Text Box( "Date: " ), date = Calendar Box(  ) ), // more data entry
            Spacer Box( size( 1, 30 ) ), // a little vertical space
            H Center Box( // center the button
                Button Box( "Execute", // this script runs when the button is pressed...

                    // make a new table with the values...
                    tool_val = tool &amp;lt;&amp;lt; GetSelected();
					date_val = date &amp;lt;&amp;lt; GetSelected();
					dt = New Table( "Untitled", 
					New Column( "a", Character, Set Values( tool_val ) ),
					New Column( "b", Numeric,
						"Continuous",
						//Required due to original format
						Format("y/m/d h:m:s"), Set Values( {date} ) ) );
                    
                    
                    // optionally, close the dialog. Or, you might want to run it again...
                    w &amp;lt;&amp;lt; closeWindow; // just the dialog, not the report
                )
            )
        )
    )
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 10 Jun 2023 23:46:12 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Set-user-in-put-as-new-variable/m-p/471352#M71574</guid>
      <dc:creator>LukeFarrell</dc:creator>
      <dc:date>2023-06-10T23:46:12Z</dc:date>
    </item>
    <item>
      <title>Re: Set user in put as new variable</title>
      <link>https://community.jmp.com/t5/Discussions/Set-user-in-put-as-new-variable/m-p/471374#M71577</link>
      <description>&lt;P&gt;Check out log, it gives quite good error message.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is possibly fixed script with some supporting prints (I get values with something else than &amp;lt;&amp;lt; get selected, also I set values in different way to the new table).&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);

v1 = text = " ID"; // two numbers with default

w = New Window("Synch Request", // opens a window with a title and this content...
	Border Box(top(20), bottom(20), Left(20), Right(20), // window dressing 
		V List Box( // V and H lists nest to organize the display boxes
			H Center Box(Text Box("Please select the tool you wish to view and the date to view from")), // a second title, centered
			Spacer Box(size(1, 30)), // a little vertical space
			H List Box(Text Box("Tool: "), tool = Text Edit Box(v1)), // data entry
			Spacer Box(size(1, 10)), // a little vertical space
			H List Box(Text Box("Date: "), date = Calendar Box()), // more data entry
			Spacer Box(size(1, 30)), // a little vertical space
			H Center Box( // center the button
				Button Box("Execute", // this script runs when the button is pressed...

					// make a new table with the values...
					tool_val = tool &amp;lt;&amp;lt; get text;
					show(tool_val);
					date_val = date &amp;lt;&amp;lt; get date;
					show(date_val);
					dt = New Table("Untitled",
						New Column("a", Character, Values(Eval List({tool_val}))),
						New Column("b",
							Numeric,
							"Continuous", 
						//Required due to original format
							Format("y/m/d h:m:s"),
							Values(Eval List({date_val}))
						)
					);
                    // optionally, close the dialog. Or, you might want to run it again...
					w &amp;lt;&amp;lt; closeWindow; // just the dialog, not the report
				)
			)
		)
	)
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Depending on your script, it might also be a good idea to consider using modal window&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 18 Mar 2022 22:02:13 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Set-user-in-put-as-new-variable/m-p/471374#M71577</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2022-03-18T22:02:13Z</dc:date>
    </item>
    <item>
      <title>Re: Set user in put as new variable</title>
      <link>https://community.jmp.com/t5/Discussions/Set-user-in-put-as-new-variable/m-p/471375#M71578</link>
      <description>&lt;P&gt;Thank you, the main idea of the script is to input these two variables into a separate script.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have the first variable of ID working, however the date does not seem to be working.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 18 Mar 2022 22:20:32 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Set-user-in-put-as-new-variable/m-p/471375#M71578</guid>
      <dc:creator>LukeFarrell</dc:creator>
      <dc:date>2022-03-18T22:20:32Z</dc:date>
    </item>
    <item>
      <title>Re: Set user in put as new variable</title>
      <link>https://community.jmp.com/t5/Discussions/Set-user-in-put-as-new-variable/m-p/471376#M71579</link>
      <description>&lt;P&gt;It works for me on Windows 10, with JMP 15 and JMP 16.&amp;nbsp; What version of JMP, and what operating system?&lt;/P&gt;</description>
      <pubDate>Sat, 19 Mar 2022 01:34:01 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Set-user-in-put-as-new-variable/m-p/471376#M71579</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2022-03-19T01:34:01Z</dc:date>
    </item>
    <item>
      <title>Re: Set user in put as new variable</title>
      <link>https://community.jmp.com/t5/Discussions/Set-user-in-put-as-new-variable/m-p/471399#M71581</link>
      <description>&lt;P&gt;Check out the log, what does&lt;/P&gt;
&lt;PRE class="language-jsl"&gt;&lt;CODE&gt;					show(date_val);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;print?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;With the date issue could also be with this format:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Format("y/m/d h:m:s"),&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;JMP can be a bit finnicky with formats from time to time. You could remove the formatting from the "b" column and see if it fills the row with datenum value. Then you can try to see which formats you have available from format menu.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jthi_0-1647677700701.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/40963iA7145681D23C6706/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jthi_0-1647677700701.png" alt="jthi_0-1647677700701.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jthi_1-1647677712418.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/40964iE29246C1A813D532/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jthi_1-1647677712418.png" alt="jthi_1-1647677712418.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 19 Mar 2022 08:15:19 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Set-user-in-put-as-new-variable/m-p/471399#M71581</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2022-03-19T08:15:19Z</dc:date>
    </item>
  </channel>
</rss>

