<?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: Input Boxes in Application Builder in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Input-Boxes-in-Application-Builder/m-p/16684#M15208</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you, I think I have an idea now of what I want to do.&amp;nbsp; Is it possible to have some buttons disabled as soon as application is ran? I would like to have a new button enabled only after a file has been picked.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried disabling button2 with the line &lt;EM&gt;​button2&amp;lt;&amp;lt;enable(0)&lt;/EM&gt;​ before the selectPathPress function and under "Application" instead of "Module 1".&amp;nbsp; Neither is working.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 03 Feb 2016 18:38:48 GMT</pubDate>
    <dc:creator>natalie_</dc:creator>
    <dc:date>2016-02-03T18:38:48Z</dc:date>
    <item>
      <title>Input Boxes in Application Builder</title>
      <link>https://community.jmp.com/t5/Discussions/Input-Boxes-in-Application-Builder/m-p/16682#M15206</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am just learning how to use the application.&amp;nbsp; The only time I have ever created a user interface, it was with Lab View.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyhow, I would like to have input boxes.&amp;nbsp; I need a box where someone can enter the path to find the file and select which voltage to find corresponding currents at.&amp;nbsp; I have made buttons so far to do this, but it is one button for each input, and I think that once the button is pushed, the input is lost (could be wrong).&amp;nbsp; Once I have these inputs, then I can create plots, etc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could someone please advise me or give me a hint about how I can do this in JMP?&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is my script so far in the builder:&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SelectPathPress=Function({this},&lt;/P&gt;&lt;P&gt;&amp;nbsp; // This function is called when the button is pressed&lt;/P&gt;&lt;P&gt;&amp;nbsp; path = Pick Directory("Select CP1 Directory.");&lt;/P&gt;&lt;P&gt;&amp;nbsp; name = this &amp;lt;&amp;lt; Get Button Name;&lt;/P&gt;&lt;P&gt;);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SelectCP2DirectoryPress=Function({this},&lt;/P&gt;&lt;P&gt;&amp;nbsp; // This function is called when the button is pressed&lt;/P&gt;&lt;P&gt;&amp;nbsp; path = Pick Directory("Select CP2 Directory.");&lt;/P&gt;&lt;P&gt;&amp;nbsp; name = this &amp;lt;&amp;lt; Get Button Name;&lt;/P&gt;&lt;P&gt;);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EvaluationVoltagePress=Function({this},&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; New Window( "New Window",&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&amp;lt;Modal,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Get user input,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; V List Box(&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp; Spacer Box(size(10,10)),&lt;/P&gt;&lt;P&gt;&amp;nbsp; Text Box ("Enter voltage:"),&lt;/P&gt;&lt;P&gt;&amp;nbsp; Spacer Box(size(10,10)),&lt;/P&gt;&lt;P&gt;&amp;nbsp; voltage = H List Box(Number Edit Box()),&lt;/P&gt;&lt;P&gt;&amp;nbsp; Spacer Box(size(10,10)),&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; H List Box(&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; b=Button Box( "OK",&amp;lt;&amp;lt;Close Window&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Proceed with option 1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ),&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Button Box( "Cancel", Throw( "Script cancelled by user." ) )&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; )));&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Caption({1,1}, char(displayvoltage));&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;);&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Feb 2016 21:28:03 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Input-Boxes-in-Application-Builder/m-p/16682#M15206</guid>
      <dc:creator>natalie_</dc:creator>
      <dc:date>2016-02-02T21:28:03Z</dc:date>
    </item>
    <item>
      <title>Re: Input Boxes in Application Builder</title>
      <link>https://community.jmp.com/t5/Discussions/Input-Boxes-in-Application-Builder/m-p/16683#M15207</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;make a text box and a button.&amp;nbsp; Make the text box &lt;EM&gt;&lt;STRONG&gt;VariableName&lt;/STRONG&gt;&lt;/EM&gt; "filename" and change the &lt;STRONG&gt;&lt;EM&gt;title&lt;/EM&gt;&lt;/STRONG&gt; of the button.&amp;nbsp; Note the distinction between variable name and title; there will be a JSL variable filename that points to the text box holding the file's name.&amp;nbsp; And the button will have a title on its face.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your script should look like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SelectPathPress=Function({this},&lt;/P&gt;&lt;P&gt;&amp;nbsp; // This function is called when the button is pressed&lt;/P&gt;&lt;P&gt;&amp;nbsp; path = Pick Directory("Select CP1 Directory.");&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;STRONG&gt;&lt;EM&gt;filename&lt;/EM&gt;&lt;/STRONG&gt;&amp;lt;&amp;lt;settext(path);&lt;/P&gt;&lt;P&gt;);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;filename is the variable name that you gave the textbox.&amp;nbsp; You don't need the boiler-plate "&lt;SPAN style="color: #555555; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;name = this &amp;lt;&amp;lt; Get Button Name;&lt;/SPAN&gt;" that App Builder gave you as an example.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your next button will also have a script, and it can retrieve filename&amp;lt;&amp;lt;gettext and do something with it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Eventually you may wish you had named the buttons with meaningful variable names (in addition to their titles).&amp;nbsp; You would use the button's variable name to enable and disable the button.&amp;nbsp; Here, button2 (title and variable) was disabled by the pick file button, and it would be so much better it it said GenerateReportButton&amp;lt;&amp;lt;enable(0)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="10887_pastedImage_11.png" style="width: 225px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/2678i3E9D66586E9DD865/image-size/medium?v=v2&amp;amp;px=400" role="button" title="10887_pastedImage_11.png" alt="10887_pastedImage_11.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="10888_pastedImage_12.png" style="width: 511px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/2679i674035734AD6645A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="10888_pastedImage_12.png" alt="10888_pastedImage_12.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Oct 2016 01:46:10 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Input-Boxes-in-Application-Builder/m-p/16683#M15207</guid>
      <dc:creator>Craige_Hales</dc:creator>
      <dc:date>2016-10-19T01:46:10Z</dc:date>
    </item>
    <item>
      <title>Re: Input Boxes in Application Builder</title>
      <link>https://community.jmp.com/t5/Discussions/Input-Boxes-in-Application-Builder/m-p/16684#M15208</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you, I think I have an idea now of what I want to do.&amp;nbsp; Is it possible to have some buttons disabled as soon as application is ran? I would like to have a new button enabled only after a file has been picked.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried disabling button2 with the line &lt;EM&gt;​button2&amp;lt;&amp;lt;enable(0)&lt;/EM&gt;​ before the selectPathPress function and under "Application" instead of "Module 1".&amp;nbsp; Neither is working.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Feb 2016 18:38:48 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Input-Boxes-in-Application-Builder/m-p/16684#M15208</guid>
      <dc:creator>natalie_</dc:creator>
      <dc:date>2016-02-03T18:38:48Z</dc:date>
    </item>
    <item>
      <title>Re: Input Boxes in Application Builder</title>
      <link>https://community.jmp.com/t5/Discussions/Input-Boxes-in-Application-Builder/m-p/16685#M15209</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You should be able to send the &amp;lt;&amp;lt;enable(0) message from the script for Module 1, but it has to appear after the line "thisModuleInstance &amp;lt;&amp;lt; Create Objects".&amp;nbsp; Before this point, the Button1 name is not attached to anything.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This will not work from the Application script, because the Application script runs before any module is created, and therefore before the button has been created.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Feb 2016 18:47:03 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Input-Boxes-in-Application-Builder/m-p/16685#M15209</guid>
      <dc:creator>danschikore</dc:creator>
      <dc:date>2016-02-03T18:47:03Z</dc:date>
    </item>
    <item>
      <title>Re: Input Boxes in Application Builder</title>
      <link>https://community.jmp.com/t5/Discussions/Input-Boxes-in-Application-Builder/m-p/16686#M15210</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you!&amp;nbsp; I shouldn't have deleted everything....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Feb 2016 18:51:19 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Input-Boxes-in-Application-Builder/m-p/16686#M15210</guid>
      <dc:creator>natalie_</dc:creator>
      <dc:date>2016-02-03T18:51:19Z</dc:date>
    </item>
  </channel>
</rss>

