<?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 Dynamic Display box based on user selection in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Dynamic-Display-box-based-on-user-selection/m-p/364681#M61419</link>
    <description>&lt;P&gt;How to dynamically update a window based on user selection from either a combo box selection or radio box ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've gone so far as trying out the script below but instead of replacing the text box, it kept appending new text boxes. How to update the script to change the display based on selection ?&lt;/P&gt;&lt;P&gt;I'm planning to incorporate more things beyond just text boxes (i.e. button boxes, col list boxes, etc).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Appreciate the help&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;nw1 = new window("New Test",
	tab box(
		TB = Tab page box("Analysis",
			V list box(
				H list box(
					combo1 = combobox({"","Normal","Lognormal"},
						&amp;lt;&amp;lt;setfunction(
							function({this,index},
								match(index,
									1,TB &amp;lt;&amp;lt; append (text box("number 1")),
									2,TB &amp;lt;&amp;lt; append (text box("number 2")),
									3,TB &amp;lt;&amp;lt; append (text box("number 3")),
								)
							)
						)
					)
				)
			)
		)
	)
)&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Fri, 09 Jun 2023 22:07:23 GMT</pubDate>
    <dc:creator>Djtjhin</dc:creator>
    <dc:date>2023-06-09T22:07:23Z</dc:date>
    <item>
      <title>Dynamic Display box based on user selection</title>
      <link>https://community.jmp.com/t5/Discussions/Dynamic-Display-box-based-on-user-selection/m-p/364681#M61419</link>
      <description>&lt;P&gt;How to dynamically update a window based on user selection from either a combo box selection or radio box ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've gone so far as trying out the script below but instead of replacing the text box, it kept appending new text boxes. How to update the script to change the display based on selection ?&lt;/P&gt;&lt;P&gt;I'm planning to incorporate more things beyond just text boxes (i.e. button boxes, col list boxes, etc).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Appreciate the help&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;nw1 = new window("New Test",
	tab box(
		TB = Tab page box("Analysis",
			V list box(
				H list box(
					combo1 = combobox({"","Normal","Lognormal"},
						&amp;lt;&amp;lt;setfunction(
							function({this,index},
								match(index,
									1,TB &amp;lt;&amp;lt; append (text box("number 1")),
									2,TB &amp;lt;&amp;lt; append (text box("number 2")),
									3,TB &amp;lt;&amp;lt; append (text box("number 3")),
								)
							)
						)
					)
				)
			)
		)
	)
)&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 09 Jun 2023 22:07:23 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Dynamic-Display-box-based-on-user-selection/m-p/364681#M61419</guid>
      <dc:creator>Djtjhin</dc:creator>
      <dc:date>2023-06-09T22:07:23Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Display box based on user selection</title>
      <link>https://community.jmp.com/t5/Discussions/Dynamic-Display-box-based-on-user-selection/m-p/364687#M61420</link>
      <description>&lt;P&gt;You need to delete the previous text box, otherwise it will just keep adding them.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;nw1 = New Window( "New Test",
	Tab Box(
		TB = Tab Page Box(
			"Analysis",
			V List Box(
				H List Box(
					combo1 = Combo Box(
						{"", "Normal", "Lognormal"},
						&amp;lt;&amp;lt;setfunction(
							Function( {this, index},
								Match( index,
									1,
										TB &amp;lt;&amp;lt; append(
											Try( tba &amp;lt;&amp;lt; delete );
											tba = Text Box( "number 1" );
										),
									2,
										TB &amp;lt;&amp;lt; append(
											Try( tba &amp;lt;&amp;lt; delete );
											tba = Text Box( "number 2" );
										),
									3,
										TB &amp;lt;&amp;lt; append(
											Try( tba &amp;lt;&amp;lt; delete );
											tba = Text Box( "number 3" );
										),

								)
							)
						)
					)
				)
			)
		)
	)
)&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Or you can just have an empty text box and change it's value&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;nw1 = New Window( "New Test",
	Tab Box(
		TB = Tab Page Box(
			"Analysis",
			V List Box(
				H List Box(
					combo1 = Combo Box(
						{"", "Normal", "Lognormal"},
						&amp;lt;&amp;lt;setfunction(
							Function( {this, index},
								Match( index,
									1, tba &amp;lt;&amp;lt; settext( "number 1" ),
									2, tba &amp;lt;&amp;lt; settext( "number 2" ),
									3, tba &amp;lt;&amp;lt; settext( "number 3" ), 
								)
							)
						)
					)
				),
				tba = Text Box( "" )
			)
		)
	)
)&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 03 Mar 2021 03:44:02 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Dynamic-Display-box-based-on-user-selection/m-p/364687#M61420</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2021-03-03T03:44:02Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Display box based on user selection</title>
      <link>https://community.jmp.com/t5/Discussions/Dynamic-Display-box-based-on-user-selection/m-p/364715#M61423</link>
      <description>&lt;P&gt;Thanks Jim! it works&lt;/P&gt;</description>
      <pubDate>Wed, 03 Mar 2021 06:42:59 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Dynamic-Display-box-based-on-user-selection/m-p/364715#M61423</guid>
      <dc:creator>Djtjhin</dc:creator>
      <dc:date>2021-03-03T06:42:59Z</dc:date>
    </item>
  </channel>
</rss>

