<?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: How to create a two column user input modal window where the second column is populated based on single input on first column? in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/How-to-create-a-two-column-user-input-modal-window-where-the/m-p/685475#M87160</link>
    <description>&lt;P&gt;You really should read through scripting guide and check out scripting index to understand what is going on.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here (1);

get_childids = function({user_input}, {Default Local},
	show(user_input);
	// do something
	// get return value...
	retval = user_input; // for demo purposes
	return(retval);
);
	
nw = New Window("Fetch Summary Data ",
	H List Box(
		Panel Box("[1] Enter Parent ID", //sets outside panel
			Lineup Box(N Col(2),
			pid = Text Edit Box("", &amp;lt;&amp;lt; Set Width(150)),	
				Button Box("Get Child ID(s)", 
					user_input = pid &amp;lt;&amp;lt; get text;
					childids = get_childids(user_input);
					// do something with childids (or do it outside within the function but change the function name)
				);
			)
		)
	)
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 10 Oct 2023 16:10:31 GMT</pubDate>
    <dc:creator>jthi</dc:creator>
    <dc:date>2023-10-10T16:10:31Z</dc:date>
    <item>
      <title>How to create a two column user input modal window where the second column is populated based on single input on first column?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-create-a-two-column-user-input-modal-window-where-the/m-p/685004#M87097</link>
      <description>&lt;P&gt;I would like to create a two column user input modal window where the user input goes into the first column (single input box) for a "parent part ID", based on which adjacent second column window entries (child part IDs) get populated.&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;The entries in the second column come from a database query (for which I already have a script). A "parent part ID" can have one or more than one "child part IDs"&lt;/LI&gt;&lt;LI&gt;This query script needs to run upon a checkbox being checked adjacent to the parent part ID input box after the input.&lt;/LI&gt;&lt;LI&gt;Once one or more than one child part IDs (as the case may be) are selected in the second column (again using checkbox), press of the OK button at the bottom of the modal window is to make the selected entries in second column available (as a list) for a follow on script to use.&lt;/LI&gt;&lt;LI&gt;A select all option for the entries in the second column would be an added advantage.&amp;nbsp;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;I would appreciate if I can get some ideas on how to proceed with this in JSL?&lt;/P&gt;</description>
      <pubDate>Mon, 09 Oct 2023 14:32:14 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-create-a-two-column-user-input-modal-window-where-the/m-p/685004#M87097</guid>
      <dc:creator>Neo</dc:creator>
      <dc:date>2023-10-09T14:32:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a two column user input modal window where the second column is populated based on single input on first column?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-create-a-two-column-user-input-modal-window-where-the/m-p/685135#M87105</link>
      <description>&lt;P&gt;Could you create some sort of mock-up of the UI and provide some example data?&lt;/P&gt;</description>
      <pubDate>Mon, 09 Oct 2023 17:25:32 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-create-a-two-column-user-input-modal-window-where-the/m-p/685135#M87105</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2023-10-09T17:25:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a two column user input modal window where the second column is populated based on single input on first column?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-create-a-two-column-user-input-modal-window-where-the/m-p/685199#M87114</link>
      <description>&lt;P&gt;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/14366"&gt;@jthi&lt;/a&gt;&amp;nbsp;Please see attached. User enters e.g. 9098 and checks the box (red tick, does not need to red colour btw) under Parent Part ID. Checking this box runs a script in the background which generates a single column data table or a list (I have this script so can do either as needed). The row values of this single column table or list values populate the rows on the right side of the user input window, under Child Part ID. User then selects the Chart Part IDs as desired using the check box ("select all" and "uncheck all" options would be great to have).&lt;/P&gt;&lt;P&gt;Upon pressing Fetch, the Parent Part ID and Child Part IDs are to be made available as two separate lists&amp;nbsp; for a follow on script to use.&lt;/P&gt;&lt;P&gt;Hope I have been able to explain clearly enough.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Neo_1-1696886148417.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/57321iFDE614B5D3A392C7/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Neo_1-1696886148417.png" alt="Neo_1-1696886148417.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 09 Oct 2023 21:18:49 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-create-a-two-column-user-input-modal-window-where-the/m-p/685199#M87114</guid>
      <dc:creator>Neo</dc:creator>
      <dc:date>2023-10-09T21:18:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a two column user input modal window where the second column is populated based on single input on first column?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-create-a-two-column-user-input-modal-window-where-the/m-p/685326#M87131</link>
      <description>&lt;P&gt;Ok. Few suggestions I would replace check boxes with buttons. For Parent Part ID it could be something like "Get Child Part IDs" and for Child Part ID buttons for "Select All" an "Unselect All". User can perform their selections in the list box.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This might give you some ideas what you could do&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);

aa_parents = ["123" =&amp;gt; {"111", "222", "333"}, "345" =&amp;gt; {"555", "777", "999"}];
aa_parents &amp;lt;&amp;lt; Set Default Value({});

get_childids = function({this}, {Default Local},
	new_childids = aa_parents[(this &amp;lt;&amp;lt; prev sib) &amp;lt;&amp;lt; get text];
	lb_child &amp;lt;&amp;lt; Set items(new_childids);
);

nw = New Window("", /*&amp;lt;&amp;lt; modal*/
	H List Box(
		Panel Box("Parent ID",
			Lineup Box(N Col(2),
				Text Edit Box("", &amp;lt;&amp;lt; Set Width(150)),
				Button Box("Get Child Ids", &amp;lt;&amp;lt; set function(function({this},
					get_childids(this);
				)))
			)
		),
		Panel Box("Child ID",
			H List Box(
				lb_child = List Box({}),
				Lineup Box(N Col(1),
					Button Box("Select All", 
						For Each({item, idx}, lb_child &amp;lt;&amp;lt; get items,
							lb_child &amp;lt;&amp;lt; Set Selected(idx);
						);
						wait(0);
					),
					Button Box("Unselect All",
						lb_child &amp;lt;&amp;lt; Clear selection;
					),
				)
			)
		),
		Panel Box("Actions",
			Lineup Box(N Col(1),
				Button Box("OK"),
				Button Box("Cancel")
			)
		)
	)
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 10 Oct 2023 05:24:13 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-create-a-two-column-user-input-modal-window-where-the/m-p/685326#M87131</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2023-10-10T05:24:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a two column user input modal window where the second column is populated based on single input on first column?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-create-a-two-column-user-input-modal-window-where-the/m-p/685413#M87142</link>
      <description>&lt;P&gt;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/14366"&gt;@jthi&lt;/a&gt;&amp;nbsp;Thanks. This should do the job. Buttons in place of check box is fine. I have changed your script to a function but struggling to place get selected () correctly to get the selected values as list (e.g. my commented Return statement at the bottom of the function) when user clicks OK. Please could I get some pointers on where to place get selected () correctly?&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here (1);

getUserInput  = Function ({aa_parent}, {return_selectionAslist},

aa_parents &amp;lt;&amp;lt; Set Default Value({});

get_childids = function({this}, {Default Local},
	new_childids = aa_parents[(this &amp;lt;&amp;lt; prev sib) &amp;lt;&amp;lt; get text];
	lb_child &amp;lt;&amp;lt; Set items(new_childids);
		
	);

nw = New Window("", 
	H List Box(
		Panel Box("[1] Enter Parent ID",
			Lineup Box(N Col(2),
				Text Edit Box("", &amp;lt;&amp;lt; Set Width(150)),
				Button Box("Get Child Ids", &amp;lt;&amp;lt; set function(function({this},
					get_childids(this);
				)))
			)
		),
		Panel Box("[2] Select Child ID",
			H List Box(
				lb_child = List Box({}),
				Lineup Box(N Col(1),
					Button Box("Select All", 
						For Each({item, idx}, lb_child &amp;lt;&amp;lt; get items,
							lb_child &amp;lt;&amp;lt; Set Selected(idx);
						);
						wait(0);
					),
					Button Box("Unselect All",
						lb_child &amp;lt;&amp;lt; Clear selection;
					),
				)
			)
		),
		Panel Box("[3] Fetch Test Data",
			Lineup Box(N Col(1),
				Button Box("OK"),
				Button Box("Cancel")
			)
		)
	)
);

// return_selectionAslist = As List [Parent ID, selected_Child_ID(s) ];
Return (return_selectionAslist); 
);

//Test
clear log ();
aa_parent_1 = ["123" =&amp;gt; {"111", "222", "333"}]; aa_parent_2 = ["345" =&amp;gt; {"555", "777", "999"}]; 
myList= getUserInput (aa_parent_1);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 10 Oct 2023 09:43:40 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-create-a-two-column-user-input-modal-window-where-the/m-p/685413#M87142</guid>
      <dc:creator>Neo</dc:creator>
      <dc:date>2023-10-10T09:43:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a two column user input modal window where the second column is populated based on single input on first column?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-create-a-two-column-user-input-modal-window-where-the/m-p/685414#M87143</link>
      <description>&lt;P&gt;Put it inside OK button so it will be executed when user presses that button.&lt;/P&gt;</description>
      <pubDate>Tue, 10 Oct 2023 09:53:37 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-create-a-two-column-user-input-modal-window-where-the/m-p/685414#M87143</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2023-10-10T09:53:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a two column user input modal window where the second column is populated based on single input on first column?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-create-a-two-column-user-input-modal-window-where-the/m-p/685417#M87144</link>
      <description>&lt;P&gt;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/14366"&gt;@jthi&lt;/a&gt;&amp;nbsp;Thanks. Just realized that a key part which is missing in the function above is that a script (which I have) needs to run (in the background) when the user clicks "Get Child IDs" which will generate the child IDs based on the parent ID entered. These child IDs get displayed in the second panel. User then chooses one or more of the Child IDs.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the example discussed here, the Parent IDs and Child IDs are already available which is not how it would be in the real case.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How to get a script to run when the user clicks on&amp;nbsp;"Get Child IDs" the output of which populates the Child IDs?&lt;/P&gt;</description>
      <pubDate>Tue, 10 Oct 2023 10:00:51 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-create-a-two-column-user-input-modal-window-where-the/m-p/685417#M87144</guid>
      <dc:creator>Neo</dc:creator>
      <dc:date>2023-10-10T10:00:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a two column user input modal window where the second column is populated based on single input on first column?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-create-a-two-column-user-input-modal-window-where-the/m-p/685420#M87145</link>
      <description>&lt;P&gt;I did provide you with an idea on how to handle that with get_childids, replace it with your own function which gets the data and then sets the values (aa_parents is just "simulating" the database in this case).&lt;/P&gt;</description>
      <pubDate>Tue, 10 Oct 2023 10:14:31 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-create-a-two-column-user-input-modal-window-where-the/m-p/685420#M87145</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2023-10-10T10:14:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a two column user input modal window where the second column is populated based on single input on first column?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-create-a-two-column-user-input-modal-window-where-the/m-p/685423#M87146</link>
      <description>&lt;P&gt;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/14366"&gt;@jthi&lt;/a&gt;&amp;nbsp;Yes thanks. I need help on how to run a script (actually a function with Parent ID as input) when the&amp;nbsp;&lt;SPAN&gt;Get Child IDs button is clicked.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 10 Oct 2023 11:01:35 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-create-a-two-column-user-input-modal-window-where-the/m-p/685423#M87146</guid>
      <dc:creator>Neo</dc:creator>
      <dc:date>2023-10-10T11:01:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a two column user input modal window where the second column is populated based on single input on first column?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-create-a-two-column-user-input-modal-window-where-the/m-p/685426#M87147</link>
      <description>&lt;P&gt;Example is already there. Is there something you cannot convert to work with your script? &lt;EM&gt;this&lt;/EM&gt; maybe, which can be confusing even though it is just a name for argument/parameter which refers to the element which calls the function?&lt;/P&gt;</description>
      <pubDate>Tue, 10 Oct 2023 11:10:13 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-create-a-two-column-user-input-modal-window-where-the/m-p/685426#M87147</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2023-10-10T11:10:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a two column user input modal window where the second column is populated based on single input on first column?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-create-a-two-column-user-input-modal-window-where-the/m-p/685427#M87148</link>
      <description>&lt;P&gt;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/14366"&gt;@jthi&lt;/a&gt;&amp;nbsp;My JMP skills are not good yet (I have been a Matlab user so far) so still struggle with the JMP way of thinking. I am trying this side but so far no success. Never used &lt;EM&gt;this&lt;/EM&gt; before.&lt;/P&gt;&lt;P&gt;What I was trying was use Get Selected Indices (), something I have used before, to capture user click on &lt;SPAN&gt;Get Child IDs,&lt;/SPAN&gt;&amp;nbsp;based on which get the function call to fire and get the Child IDs. Again no success so far.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 10 Oct 2023 11:24:28 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-create-a-two-column-user-input-modal-window-where-the/m-p/685427#M87148</guid>
      <dc:creator>Neo</dc:creator>
      <dc:date>2023-10-10T11:24:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a two column user input modal window where the second column is populated based on single input on first column?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-create-a-two-column-user-input-modal-window-where-the/m-p/685436#M87149</link>
      <description>&lt;P&gt;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/14366"&gt;@jthi&lt;/a&gt;&amp;nbsp;. I seem to have made some progress, but still need help.&lt;/P&gt;&lt;P&gt;I have moved back to script (in place of function in post 5 in this thread).&lt;/P&gt;&lt;P&gt;Below is partly working script. I am struggling to input the Parent ID (e.g. "715" below) from users Parent ID input in my fetchChildIds function. Need help here.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I basically need to get the input to the text edit box into my function argument to replace "715".&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);
clear log ();
include ("_fetchChildIds.jsl");
//aa_parents &amp;lt;&amp;lt; Set Default Value({});

get_childids = function({this}, {Default Local},
	//new_childids = aa_parents[(this &amp;lt;&amp;lt; prev sib) &amp;lt;&amp;lt; get text];
	
	new_childids = fetchChildIds ("715");
	lb_child &amp;lt;&amp;lt; Set items(new_childids);
	);
	
nw = New Window("", 
	H List Box(
		Panel Box("[1] Enter Parent ID", //sets outside panel
			Lineup Box(N Col(2),
			pid = Text Edit Box("", &amp;lt;&amp;lt; Set Width(150)),
				Button Box("Get Child ID(s)", &amp;lt;&amp;lt; set function(function({this},
					get_childids(this);
				)))
			)
		),
		Panel Box("[2] Select Child ID",
			H List Box(
				lb_child = List Box({}),
				Lineup Box(N Col(1),
					Button Box("Select All", 
						For Each({item, idx}, lb_child &amp;lt;&amp;lt; get items,
							lb_child &amp;lt;&amp;lt; Set Selected(idx);
						);
						wait(0);
					),
					Button Box("Unselect All",
						lb_child &amp;lt;&amp;lt; Clear selection;
					),
				)
			)
		),
		Panel Box("[3] Fetch Test Data",
			Lineup Box(N Col(1),
				Button Box("OK"),
				Button Box("Cancel")
			)
		)
	)
);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 10 Oct 2023 12:38:50 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-create-a-two-column-user-input-modal-window-where-the/m-p/685436#M87149</guid>
      <dc:creator>Neo</dc:creator>
      <dc:date>2023-10-10T12:38:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a two column user input modal window where the second column is populated based on single input on first column?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-create-a-two-column-user-input-modal-window-where-the/m-p/685440#M87151</link>
      <description>&lt;P&gt;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/14366"&gt;@jthi&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Why does this not show the user entered parent ID. It proceeds with 715. An updated value is not taken/used. Am I placing in the wrong place i.e. under the Text Edit Box?&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;pid = Text Edit Box("715", &amp;lt;&amp;lt; Set Width(150)),	
			ParentID = nw["pid" ];	show (ParentID);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;the user updated ParentID is available outside the New Window (), but iI think I need it when the Button Box is pressed.&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Button Box("Get Child ID(s)", &amp;lt;&amp;lt; set function(function({this},
					get_childids(this); &lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 10 Oct 2023 13:19:20 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-create-a-two-column-user-input-modal-window-where-the/m-p/685440#M87151</guid>
      <dc:creator>Neo</dc:creator>
      <dc:date>2023-10-10T13:19:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a two column user input modal window where the second column is populated based on single input on first column?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-create-a-two-column-user-input-modal-window-where-the/m-p/685447#M87152</link>
      <description>&lt;P&gt;You need to use &amp;lt;&amp;lt; Get Text to get the value from Text Edit Box&lt;/P&gt;</description>
      <pubDate>Tue, 10 Oct 2023 13:32:38 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-create-a-two-column-user-input-modal-window-where-the/m-p/685447#M87152</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2023-10-10T13:32:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a two column user input modal window where the second column is populated based on single input on first column?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-create-a-two-column-user-input-modal-window-where-the/m-p/685448#M87153</link>
      <description>&lt;P&gt;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/14366"&gt;@jthi&lt;/a&gt;&amp;nbsp; yes, tried &amp;lt;&amp;lt; Get Text. I can get the value out ouside the new window()&lt;/P&gt;&lt;P&gt;I think my issue is correct placement of the Get Text.&lt;/P&gt;&lt;P&gt;I cannot get the Parent ID from user input to pass on correctly when "Get Child ID" button is placed.&lt;/P&gt;&lt;P&gt;Pressing "Get Child ID" should run my fetch Child ID function with the&amp;nbsp;Parent ID from user input.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Would appreciate some help here.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 10 Oct 2023 13:49:06 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-create-a-two-column-user-input-modal-window-where-the/m-p/685448#M87153</guid>
      <dc:creator>Neo</dc:creator>
      <dc:date>2023-10-10T13:49:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a two column user input modal window where the second column is populated based on single input on first column?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-create-a-two-column-user-input-modal-window-where-the/m-p/685449#M87154</link>
      <description>&lt;P&gt;You are using hard-coded input value of "715" and not the user's input&lt;/P&gt;</description>
      <pubDate>Tue, 10 Oct 2023 14:08:24 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-create-a-two-column-user-input-modal-window-where-the/m-p/685449#M87154</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2023-10-10T14:08:24Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a two column user input modal window where the second column is populated based on single input on first column?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-create-a-two-column-user-input-modal-window-where-the/m-p/685450#M87155</link>
      <description>&lt;P&gt;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/14366"&gt;@jthi&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;gt;&amp;gt;&lt;SPAN&gt;You are using hard-coded input value of "715" and not the user's input&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;This was just to show what I am doing. I want to replace "715" with user input.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The Parent ID needs to pass to the function&amp;nbsp;argument when the Get Child IDs botton&amp;nbsp;is pressed.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;fetchChildIds ()&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;The hard coded case works as expected, but I cannot get the user input in as an argument to my above mentioned function.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 10 Oct 2023 14:16:53 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-create-a-two-column-user-input-modal-window-where-the/m-p/685450#M87155</guid>
      <dc:creator>Neo</dc:creator>
      <dc:date>2023-10-10T14:16:53Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a two column user input modal window where the second column is populated based on single input on first column?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-create-a-two-column-user-input-modal-window-where-the/m-p/685467#M87156</link>
      <description>&lt;P&gt;The script has no indications of you using for example&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;pid  &amp;lt;&amp;lt; get text&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;my method of using of using this to travel display boxes is more complicated (but sometimes might be more robust), just using reference should be enough.&lt;/P&gt;
&lt;P&gt;Also start with very simple script and get it working first. Start with scripting index example:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);
win = New Window("Example", fontobj = text = Text Edit Box("Example Text"));
Print(text &amp;lt;&amp;lt; Get Text());&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;modify it to have button box&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);
win = New Window("Example", 
	teb = Text Edit Box("Example Text"),
	Button Box("Get Text")
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;add function/expression to the button&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);
win = New Window("Example", 
	teb = Text Edit Box("Example Text"),
	Button Box("Get Text",
		show(teb &amp;lt;&amp;lt; get text)
	);
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;move the function/expression out of button box&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);

get_my_text = function({}, {Default Local},
	show(teb &amp;lt;&amp;lt; get text)
);

win = New Window("Example", 
	teb = Text Edit Box("Example Text"),
	Button Box("Get Text",
		get_my_text();
	);
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;make the function return something&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);

get_my_text = function({}, {Default Local},
	teb_txt = teb &amp;lt;&amp;lt; get text;
	return(teb_txt);
);

win = New Window("Example", 
	teb = Text Edit Box("Example Text"),
	Button Box("Get Text",
		user_txt = get_my_text();
		show(user_txt);
	);
);
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;and so on. It is very difficult to try and get the whole script working on one go, so work on much smaller problems one at the time&lt;/P&gt;</description>
      <pubDate>Tue, 10 Oct 2023 14:39:58 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-create-a-two-column-user-input-modal-window-where-the/m-p/685467#M87156</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2023-10-10T14:39:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a two column user input modal window where the second column is populated based on single input on first column?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-create-a-two-column-user-input-modal-window-where-the/m-p/685470#M87157</link>
      <description>&lt;P&gt;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/14366"&gt;@jthi&lt;/a&gt;&amp;nbsp;Many thanks for your inputs. I have now made the script much smaller which I hope will help highlight the issue I am having.&lt;/P&gt;&lt;P&gt;My comment in capital case below (adjacent to&amp;nbsp;returnedPid = pid &amp;lt;&amp;lt; get text; show (returnedPid)) is where I need help.&lt;/P&gt;&lt;P&gt;The user input on Parent ID is not getting passed onto get_childids function call.&amp;nbsp; Is my &amp;lt;&amp;lt;get text misplaced (it is reporting the default value "" and not the user updated value)?&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here (1);
// function inclusion to fetch child IDs from data base for a given Parent ID.
include ("_fetchChildIds.jsl"); // function called below.

get_childids = function({this}, {Default Local},
	new_childids = fetchChildIds (returnedPid);
	//lb_child &amp;lt;&amp;lt; Set items(new_childids);
	);
	
nw = New Window("FetchData ", //&amp;lt;&amp;lt; Modal, &amp;lt;&amp;lt;Return Result,
	H List Box(
		Panel Box("[1] Enter Parent ID", //sets outside panel
			Lineup Box(N Col(2),
			pid = Text Edit Box("", &amp;lt;&amp;lt; Set Width(150)),	// defines the user input box
			returnedPid = pid &amp;lt;&amp;lt; get text;	show (returnedPid); //DOES NOT GET/SHOW USER INPUT 
				Button Box("Get Child ID(s)", &amp;lt;&amp;lt; set function(function({this},
					get_childids(this); 
				)))
			)
		),
		Panel Box("Fetch Test Data",
			Lineup Box(N Col(1),
				Button Box("OK"),
				Button Box("Cancel")
			)
		)
	)
);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 10 Oct 2023 15:08:40 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-create-a-two-column-user-input-modal-window-where-the/m-p/685470#M87157</guid>
      <dc:creator>Neo</dc:creator>
      <dc:date>2023-10-10T15:08:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a two column user input modal window where the second column is populated based on single input on first column?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-create-a-two-column-user-input-modal-window-where-the/m-p/685471#M87158</link>
      <description>&lt;P&gt;It should be inside the button box, not somewhere in between text edit box and button box. &lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);

nw = New Window("FetchData ",
	H List Box(
		Panel Box("[1] Enter Parent ID", 
			Lineup Box(N Col(2),
				pid = Text Edit Box("", &amp;lt;&amp;lt;Set Width(150)),
				Button Box("Get Child ID(s)",
					returnedPid = pid &amp;lt;&amp;lt; get text;
					Show(returnedPid); // does get user input
				)
			)
		),
		Panel Box("Fetch Test Data", 
			Lineup Box(N Col(1), 
				Button Box("OK"), 
				Button Box("Cancel")
			)
		)
	)
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 10 Oct 2023 15:14:45 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-create-a-two-column-user-input-modal-window-where-the/m-p/685471#M87158</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2023-10-10T15:14:45Z</dc:date>
    </item>
  </channel>
</rss>

