<?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 get check boxes to be change (or become visible or active) based on a previous selection in a modal window? in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/How-to-get-check-boxes-to-be-change-or-become-visible-or-active/m-p/709028#M89299</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;While I am on this topic (and not creating a new thread asking a new but related question), I am wondering if it is possible to show a text showing the user what each test stage did when the user selects it. Example pasted below.&amp;nbsp; Text only shows when selection is made and remains until unchecked.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Neo_0-1702488383263.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/59636i8F72FD1BE4DCB6E2/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Neo_0-1702488383263.png" alt="Neo_0-1702488383263.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 13 Dec 2023 17:27:57 GMT</pubDate>
    <dc:creator>Neo</dc:creator>
    <dc:date>2023-12-13T17:27:57Z</dc:date>
    <item>
      <title>How to get check boxes to be change (or become visible or active) based on a previous selection in a modal window?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-get-check-boxes-to-be-change-or-become-visible-or-active/m-p/708398#M89240</link>
      <description>&lt;P&gt;In the following script, I would like to do the following:&lt;/P&gt;&lt;P&gt;Based on the selection of &lt;EM&gt;TestTech&lt;/EM&gt;, I want the appropriate &lt;EM&gt;TestStage&lt;/EM&gt; check box list to appear (&lt;EM&gt;appear&lt;/EM&gt; is preferred, if not &lt;EM&gt;become active&lt;/EM&gt; if all options need to be visible).&amp;nbsp;So,&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;if &lt;EM&gt;Tech1&lt;/EM&gt; is selected, all &lt;EM&gt;TestSage&lt;/EM&gt;s with &lt;EM&gt;_Tech1&lt;/EM&gt; should be available to the user for selection&lt;/LI&gt;&lt;LI&gt;if &lt;EM&gt;Tech2&lt;/EM&gt; is selected, all &lt;EM&gt;TestSage&lt;/EM&gt;s with &lt;EM&gt;_Tech2&lt;/EM&gt; should be available to the user for selection. This list is commented below&lt;/LI&gt;&lt;LI&gt;if &lt;EM&gt;Tech3&lt;/EM&gt; is selected, all &lt;EM&gt;TestSage&lt;/EM&gt;s with &lt;EM&gt;_Tech3&lt;/EM&gt; should be available to the user for selection. This list is commented below, and so on.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;I would also like "&lt;EM&gt;Select All&lt;/EM&gt;" option to be available under each checkbox list.&lt;/P&gt;&lt;P&gt;How to do this?&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 ();

listInd = {};
returned2 = {};

win = New Window( "Select Tech &amp;amp; TestStage", &amp;lt;&amp;lt; modal,
   	
   V List Box (
   
   tb1=Text Box("Select Tech", &amp;lt;&amp;lt; set font style("bold")),
	
	cb1 = List Box(
		{"Tech1", "Tech2", "Tech3"}, 
		returned1 = (cb1 &amp;lt;&amp;lt; Get Selected()); 
		listInd= cb1 &amp;lt;&amp;lt; Get Selected Indices; 
	   ),
	
	tb1=Text Box("Select one or more TestStage", &amp;lt;&amp;lt; set font style("bold")),
	
	cb2 = Check Box(
		{"Sage1_Tech1", "Sage2_Tech1", "Sage3_Tech1", "Sage4_Tech1", "Sage5_Tech1", "Sage6_Tech1"},
	    //{"Sage1_Tech2", "Sage2_Tech2", "Sage3_Tech2", "Sage4_Tech2", "Sage5_Tech2", "Sage6_Tech2"},
	    //{"Sage1_Tech3", "Sage2_Tech3", "Sage3_Tech3", "Sage4_Tech3", "Sage5_Tech3", "Sage6_Tech3"},
		returned2 = (cb2 &amp;lt;&amp;lt; Get Selected());
		),
	
	tb3=Text Box("Query TestDate (last 6 months selected by default)", &amp;lt;&amp;lt; set font style("bold")),
	
	end_date = Today();
	start_date = Date Increment(end_date, "month", -6, "actual");
	
	cb3 =	H List Box(
		Text Box("From:"),
		scal = Number Edit Box(
			start_date,
			&amp;lt;&amp;lt;Set Format(Format("yyyy-mm-dd")),
			&amp;lt;&amp;lt;SetFunction(Function({this}, start_date = scal &amp;lt;&amp;lt; Get)),
			&amp;lt;&amp;lt;Set Show Spin Box(1)
		),
		Spacer Box(Size(20, 20)),
		Text Box("To:"),
		ecal = Number Edit Box(
			end_date,
			&amp;lt;&amp;lt;Set Format(Format("yyyy-mm-dd")),
			&amp;lt;&amp;lt;SetFunction(Function({this}, end_date = ecal &amp;lt;&amp;lt; Get)),
			&amp;lt;&amp;lt;Set Show Spin Box(1)
		),

	);
	
),	
	
);

Technology = eval (returned1[1]); show (Technology);
TestStages  = eval (returned2); show (TestStages);
TestStageOne  = TestStages[1]; show (TestStageOne );

sdt = Munger( Format Date( start_date, "yyyy-mm-dd" ), 1, "T", " " );
edt = Munger( Format Date( end_date, "yyyy-mm-dd" ), 1, "T", " " ); 

Show( sdt, edt );&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, 12 Dec 2023 16:23:07 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-get-check-boxes-to-be-change-or-become-visible-or-active/m-p/708398#M89240</guid>
      <dc:creator>Neo</dc:creator>
      <dc:date>2023-12-12T16:23:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to get check boxes to be change (or become visible or active) based on a previous selection in a modal window?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-get-check-boxes-to-be-change-or-become-visible-or-active/m-p/708417#M89242</link>
      <description>&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);

lb_values = {"Tech1", "Tech2", "Tech3"};
cb_values = {"Sage1_Tech1", "Sage2_Tech1", "Sage3_Tech1", "Sage4_Tech1", "Sage5_Tech1", "Sage6_Tech1",
	"Sage1_Tech2", "Sage2_Tech2", "Sage3_Tech2", "Sage4_Tech2", "Sage5_Tech2", "Sage6_Tech2",
	"Sage1_Tech3", "Sage2_Tech3", "Sage3_Tech3", "Sage4_Tech3", "Sage5_Tech3", "Sage6_Tech3"
};

expr_update_cb = Expr(
	cur_sel = lb &amp;lt;&amp;lt; get selected;
	If(N Items(cur_sel),
		cur_cb_values = Filter Each({val}, cb_values,
			cur_tech = Word(2, val, "_");
			Contains(cur_sel, cur_tech);
		);
	,
		cur_cb_values = cb_values;
	);
	cb2 &amp;lt;&amp;lt; Set items(cur_cb_values);
);

win = New Window("Select Tech &amp;amp; TestStage", &amp;lt;&amp;lt;modal, 
	V List Box(
		tb1 = Text Box("Select Tech", &amp;lt;&amp;lt;set font style("bold")), 
		lb = List Box({"Tech1", "Tech2", "Tech3"},
			expr_update_cb;
		), 
		tb1 = Text Box("Select one or more TestStage", &amp;lt;&amp;lt;set font style("bold")), 
		V List Box(
			cb2 = Check Box(cb_values), 
			H List Box(
				Button Box("Select All", cb2 &amp;lt;&amp;lt; Set All(1)),
				Button Box("Clear All", cb2 &amp;lt;&amp;lt; Set All(0))
			)
		),
		tb3 = Text Box(
			"Query TestDate (last 6 months selected by default)",
			&amp;lt;&amp;lt;set font style("bold")
		), 
		end_date = Today();
		start_date = Date Increment(end_date, "month", -6, "actual");
		cb3 = H List Box(
			Text Box("From:"),
			scal = Number Edit Box(
				start_date,
				&amp;lt;&amp;lt;Set Format(Format("yyyy-mm-dd")),
				&amp;lt;&amp;lt;SetFunction(Function({this}, start_date = scal &amp;lt;&amp;lt; Get)),
				&amp;lt;&amp;lt;Set Show Spin Box(1)
			),
			Spacer Box(Size(20, 20)),
			Text Box("To:"),
			ecal = Number Edit Box(
				end_date,
				&amp;lt;&amp;lt;Set Format(Format("yyyy-mm-dd")),
				&amp;lt;&amp;lt;SetFunction(Function({this}, end_date = ecal &amp;lt;&amp;lt; Get)),
				&amp;lt;&amp;lt;Set Show Spin Box(1)
			)
		);
	)
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 12 Dec 2023 17:15:51 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-get-check-boxes-to-be-change-or-become-visible-or-active/m-p/708417#M89242</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2023-12-12T17:15:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to get check boxes to be change (or become visible or active) based on a previous selection in a modal window?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-get-check-boxes-to-be-change-or-become-visible-or-active/m-p/708447#M89245</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. Running your script starts off by showing all &lt;EM&gt;TestStages&lt;/EM&gt;&amp;nbsp;under &lt;EM&gt;TestStage&lt;/EM&gt; by default (pasted below) and then once a &lt;EM&gt;Tech&lt;/EM&gt; is selected, it behaves as needed.&lt;/P&gt;&lt;P&gt;Could the script be modified to not show nothing first under &lt;EM&gt;TestStage&lt;/EM&gt; selection text and then once the &lt;EM&gt;Tech&lt;/EM&gt; is selected, show the appropriate/available TestStages?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Neo_0-1702403182736.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/59564iA09BD55EF4D040D3/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Neo_0-1702403182736.png" alt="Neo_0-1702403182736.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Dec 2023 17:48:02 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-get-check-boxes-to-be-change-or-become-visible-or-active/m-p/708447#M89245</guid>
      <dc:creator>Neo</dc:creator>
      <dc:date>2023-12-12T17:48:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to get check boxes to be change (or become visible or active) based on a previous selection in a modal window?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-get-check-boxes-to-be-change-or-become-visible-or-active/m-p/708456#M89246</link>
      <description>&lt;P&gt;You could initialize the check box with empty list instead of cb_values.&lt;/P&gt;</description>
      <pubDate>Tue, 12 Dec 2023 17:56:16 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-get-check-boxes-to-be-change-or-become-visible-or-active/m-p/708456#M89246</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2023-12-12T17:56:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to get check boxes to be change (or become visible or active) based on a previous selection in a modal window?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-get-check-boxes-to-be-change-or-become-visible-or-active/m-p/708459#M89247</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 have already tried with&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;cb_values = {};&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;but I think I am not placing this correctly. Where should this statement go?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Dec 2023 18:03:38 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-get-check-boxes-to-be-change-or-become-visible-or-active/m-p/708459#M89247</guid>
      <dc:creator>Neo</dc:creator>
      <dc:date>2023-12-12T18:03:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to get check boxes to be change (or become visible or active) based on a previous selection in a modal window?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-get-check-boxes-to-be-change-or-become-visible-or-active/m-p/708463#M89248</link>
      <description>&lt;P&gt;This is the place where you set those values first time&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jthi_0-1702404555770.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/59568iC34493CD45A9B3CC/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jthi_0-1702404555770.png" alt="jthi_0-1702404555770.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;also if you want it to be always empty when no selections are done you will also have to make small modification to expr_update_cb&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Dec 2023 18:09:43 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-get-check-boxes-to-be-change-or-become-visible-or-active/m-p/708463#M89248</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2023-12-12T18:09:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to get check boxes to be change (or become visible or active) based on a previous selection in a modal window?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-get-check-boxes-to-be-change-or-become-visible-or-active/m-p/708465#M89250</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;. In that case I did place the&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;cb_values = {};&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;correctly, but did not do the small modification to&amp;nbsp;&lt;SPAN&gt;expr_update_cb.&amp;nbsp; Just placing the above line before cb2= Check Box(... does not do what's&amp;nbsp;needed once &lt;EM&gt;Tech&lt;/EM&gt; is selected. Thinking.......&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Dec 2023 18:18:35 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-get-check-boxes-to-be-change-or-become-visible-or-active/m-p/708465#M89250</guid>
      <dc:creator>Neo</dc:creator>
      <dc:date>2023-12-12T18:18:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to get check boxes to be change (or become visible or active) based on a previous selection in a modal window?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-get-check-boxes-to-be-change-or-become-visible-or-active/m-p/708467#M89251</link>
      <description>&lt;P&gt;Initialize Check Box with empty list not cb_values (they are different things).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Within the expression this is the part you have to consider (and understand)&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jthi_0-1702405278004.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/59569iEC696071B98EF429/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jthi_0-1702405278004.png" alt="jthi_0-1702405278004.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Why is if statement used here? What would happen if we go to else? What would happen if we don't have it, we have an empty list and go to Filter Each?&lt;/P&gt;</description>
      <pubDate>Tue, 12 Dec 2023 18:21:56 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-get-check-boxes-to-be-change-or-become-visible-or-active/m-p/708467#M89251</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2023-12-12T18:21:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to get check boxes to be change (or become visible or active) based on a previous selection in a modal window?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-get-check-boxes-to-be-change-or-become-visible-or-active/m-p/708683#M89272</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 for the pointers, I tried last night but without success so far.&lt;/P&gt;&lt;P&gt;This is how I understand the requirement, if none of the items are selected in under &lt;EM&gt;lb&amp;nbsp;&lt;/EM&gt;then &lt;EM&gt;cb2&lt;/EM&gt; should not show. cb2 should show only when&amp;nbsp;N Items(cur_sel)&amp;nbsp;&lt;SPAN&gt;≥1.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;However, &lt;EM&gt;expr_update_cb&lt;/EM&gt; fires only when one or more items are selected in &lt;EM&gt;lb.&amp;nbsp;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;It is not clear to me how to modify&amp;nbsp;&lt;EM&gt;expr_update_cb &lt;/EM&gt;to be executed when nothing is selected under &lt;EM&gt;lb. &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;Should the requirement of not showing anything under &lt;EM&gt;cb2 &lt;/EM&gt;be handled with an if/else statement around &lt;EM&gt;lb &lt;/EM&gt;i.e. if nothing is selected under lb, do not show &lt;EM&gt;cb2?&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Dec 2023 10:09:17 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-get-check-boxes-to-be-change-or-become-visible-or-active/m-p/708683#M89272</guid>
      <dc:creator>Neo</dc:creator>
      <dc:date>2023-12-13T10:09:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to get check boxes to be change (or become visible or active) based on a previous selection in a modal window?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-get-check-boxes-to-be-change-or-become-visible-or-active/m-p/708688#M89273</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);

lb_values = {"Tech1", "Tech2", "Tech3"};
cb_values = {"Sage1_Tech1", "Sage2_Tech1", "Sage3_Tech1", "Sage4_Tech1", "Sage5_Tech1", "Sage6_Tech1",
	"Sage1_Tech2", "Sage2_Tech2", "Sage3_Tech2", "Sage4_Tech2", "Sage5_Tech2", "Sage6_Tech2",
	"Sage1_Tech3", "Sage2_Tech3", "Sage3_Tech3", "Sage4_Tech3", "Sage5_Tech3", "Sage6_Tech3"
};

expr_update_cb = Expr(
	cur_sel = lb &amp;lt;&amp;lt; get selected;
	cur_cb_values = Filter Each({val}, cb_values,
		cur_tech = Word(2, val, "_");
		Contains(cur_sel, cur_tech);
	);
	cb2 &amp;lt;&amp;lt; Set items(cur_cb_values);
);

win = New Window("Select Tech &amp;amp; TestStage", &amp;lt;&amp;lt;modal, 
	V List Box(
		tb1 = Text Box("Select Tech", &amp;lt;&amp;lt;set font style("bold")), 
		lb = List Box({"Tech1", "Tech2", "Tech3"},
			expr_update_cb;
		), 
		tb1 = Text Box("Select one or more TestStage", &amp;lt;&amp;lt;set font style("bold")), 
		V List Box(
			cb2 = Check Box({}), 
			H List Box(
				Button Box("Select All", cb2 &amp;lt;&amp;lt; Set All(1)),
				Button Box("Clear All", cb2 &amp;lt;&amp;lt; Set All(0))
			)
		),
		tb3 = Text Box(
			"Query TestDate (last 6 months selected by default)",
			&amp;lt;&amp;lt;set font style("bold")
		), 
		end_date = Today();
		start_date = Date Increment(end_date, "month", -6, "actual");
		cb3 = H List Box(
			Text Box("From:"),
			scal = Number Edit Box(
				start_date,
				&amp;lt;&amp;lt;Set Format(Format("yyyy-mm-dd")),
				&amp;lt;&amp;lt;SetFunction(Function({this}, start_date = scal &amp;lt;&amp;lt; Get)),
				&amp;lt;&amp;lt;Set Show Spin Box(1)
			),
			Spacer Box(Size(20, 20)),
			Text Box("To:"),
			ecal = Number Edit Box(
				end_date,
				&amp;lt;&amp;lt;Set Format(Format("yyyy-mm-dd")),
				&amp;lt;&amp;lt;SetFunction(Function({this}, end_date = ecal &amp;lt;&amp;lt; Get)),
				&amp;lt;&amp;lt;Set Show Spin Box(1)
			)
		);
	)
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Edit: Copy pasted originally wrong script&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Dec 2023 11:35:20 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-get-check-boxes-to-be-change-or-become-visible-or-active/m-p/708688#M89273</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2023-12-13T11:35:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to get check boxes to be change (or become visible or active) based on a previous selection in a modal window?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-get-check-boxes-to-be-change-or-become-visible-or-active/m-p/708689#M89274</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;Not sure why you repeat posted your original script, but this is where I have got to, still not working as needed, perhaps end looks near :)&lt;/img&gt;?&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);
clear log ();

listInd = {}; p = N Items (listInd); 

lb_values = {"Tech1", "Tech2", "Tech3"};
cb_values = {"Sage1_Tech1", "Sage2_Tech1", "Sage3_Tech1", "Sage4_Tech1", "Sage5_Tech1", "Sage6_Tech1",
	         "Sage1_Tech2", "Sage2_Tech2", "Sage3_Tech2", "Sage4_Tech2", "Sage5_Tech2", "Sage6_Tech2",
	         "Sage1_Tech3", "Sage2_Tech3", "Sage3_Tech3", "Sage4_Tech3", "Sage5_Tech3", "Sage6_Tech3"
            };

expr_update_cb = Expr(
	
	cur_sel = lb &amp;lt;&amp;lt; get selected;
	
	If(N Items(cur_sel),  cur_cb_values = Filter Each({val}, cb_values, cur_tech = Word(2, val, "_"); Contains(cur_sel, cur_tech))
	,
		cur_cb_values = cb_values;
	);
	
	p = N Items(cur_sel);
	cb2 &amp;lt;&amp;lt; Set items(cur_cb_values); show (cur_cb_values);
);

win = New Window("Select Tech &amp;amp; TestStage", &amp;lt;&amp;lt;modal, 
	V List Box(
		tb1 = Text Box("Select Tech", &amp;lt;&amp;lt;set font style("bold")), 
		lb = List Box({"Tech1", "Tech2", "Tech3"}, 
		      listInd= lb &amp;lt;&amp;lt; Get Selected Indices;  show (listInd );
		      expr_update_cb;
		      show (p);
		),
		show (p);
		tb2 = Text Box("Select one or more TestStage", &amp;lt;&amp;lt;set font style("bold")), 
		V List Box(	
		     if (p==0, cb2 ={}, p==1,
		     cb2 = Check Box(cb_values), 
		     ),
			H List Box(
				Button Box("Select All", cb2 &amp;lt;&amp;lt; Set All(1)),
				Button Box("Clear All", cb2 &amp;lt;&amp;lt; Set All(0))
			)
		),

		tb3 = Text Box(	"Query TestDate (last 6 months selected by default)", &amp;lt;&amp;lt;set font style("bold")), 
		end_date = Today();
		start_date = Date Increment(end_date, "month", -6, "actual");
		cb3 = H List Box(
			Text Box("From:"),
			scal = Number Edit Box(
				start_date,
				&amp;lt;&amp;lt;Set Format(Format("yyyy-mm-dd")),
				&amp;lt;&amp;lt;SetFunction(Function({this}, start_date = scal &amp;lt;&amp;lt; Get)),
				&amp;lt;&amp;lt;Set Show Spin Box(1)
			),
			Spacer Box(Size(20, 20)),
			Text Box("To:"),
			ecal = Number Edit Box(
				end_date,
				&amp;lt;&amp;lt;Set Format(Format("yyyy-mm-dd")),
				&amp;lt;&amp;lt;SetFunction(Function({this}, end_date = ecal &amp;lt;&amp;lt; Get)),
				&amp;lt;&amp;lt;Set Show Spin Box(1)
			)
		);
	)
);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Dec 2023 11:11:03 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-get-check-boxes-to-be-change-or-become-visible-or-active/m-p/708689#M89274</guid>
      <dc:creator>Neo</dc:creator>
      <dc:date>2023-12-13T11:11:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to get check boxes to be change (or become visible or active) based on a previous selection in a modal window?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-get-check-boxes-to-be-change-or-become-visible-or-active/m-p/708693#M89275</link>
      <description>&lt;P&gt;Most likely my broken ctrl didn't let me copy correct script and I posted too quickly. It should be fixed now.&lt;/P&gt;</description>
      <pubDate>Wed, 13 Dec 2023 11:35:59 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-get-check-boxes-to-be-change-or-become-visible-or-active/m-p/708693#M89275</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2023-12-13T11:35:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to get check boxes to be change (or become visible or active) based on a previous selection in a modal window?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-get-check-boxes-to-be-change-or-become-visible-or-active/m-p/708722#M89279</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. Your updated script from today is working. I would be interested to know if the way I was doing it today (my script from today) is an incorrect approach.&lt;/P&gt;&lt;P&gt;Also, why does the date query not show if I put &lt;EM&gt;tb3&lt;/EM&gt; and &lt;EM&gt;cb3&lt;/EM&gt; sections at the top i.e. above &lt;EM&gt;tb1?&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;(idea is to get the user to choose the dates before anything else)&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Dec 2023 11:59:37 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-get-check-boxes-to-be-change-or-become-visible-or-active/m-p/708722#M89279</guid>
      <dc:creator>Neo</dc:creator>
      <dc:date>2023-12-13T11:59:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to get check boxes to be change (or become visible or active) based on a previous selection in a modal window?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-get-check-boxes-to-be-change-or-become-visible-or-active/m-p/708728#M89282</link>
      <description>&lt;P&gt;My guess is that you are missing "," or you have ";" in wrong place&lt;/P&gt;</description>
      <pubDate>Wed, 13 Dec 2023 12:20:09 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-get-check-boxes-to-be-change-or-become-visible-or-active/m-p/708728#M89282</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2023-12-13T12:20:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to get check boxes to be change (or become visible or active) based on a previous selection in a modal window?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-get-check-boxes-to-be-change-or-become-visible-or-active/m-p/708734#M89283</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&amp;nbsp;&lt;SPAN&gt;","&amp;nbsp; placement seems correct but I still cannot get date query to work when placed at the top.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Also, how to return the value selected by "&lt;EM&gt;select all&lt;/EM&gt;"? My original placement for &lt;EM&gt;returned2&lt;/EM&gt; only seems to work for manual selection.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Dec 2023 12:41:43 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-get-check-boxes-to-be-change-or-become-visible-or-active/m-p/708734#M89283</guid>
      <dc:creator>Neo</dc:creator>
      <dc:date>2023-12-13T12:41:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to get check boxes to be change (or become visible or active) based on a previous selection in a modal window?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-get-check-boxes-to-be-change-or-become-visible-or-active/m-p/708741#M89285</link>
      <description>&lt;P&gt;I would just get all values into variables when user presses OK not when user changes their selections.&lt;/P&gt;</description>
      <pubDate>Wed, 13 Dec 2023 13:06:09 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-get-check-boxes-to-be-change-or-become-visible-or-active/m-p/708741#M89285</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2023-12-13T13:06:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to get check boxes to be change (or become visible or active) based on a previous selection in a modal window?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-get-check-boxes-to-be-change-or-become-visible-or-active/m-p/708981#M89294</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, but I can only get manual selections retuned with my placement of &lt;EM&gt;returned2&lt;/EM&gt; inside the &lt;EM&gt;cb2=Check Box (.. . &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;Please could you point me to where to place&amp;nbsp;&lt;EM&gt;cb2 &amp;lt;&amp;lt; Get Selected();&amp;nbsp; &lt;/EM&gt;to fire only when the user presses&lt;EM&gt; OK.&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Dec 2023 16:27:57 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-get-check-boxes-to-be-change-or-become-visible-or-active/m-p/708981#M89294</guid>
      <dc:creator>Neo</dc:creator>
      <dc:date>2023-12-13T16:27:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to get check boxes to be change (or become visible or active) based on a previous selection in a modal window?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-get-check-boxes-to-be-change-or-become-visible-or-active/m-p/709001#M89295</link>
      <description>&lt;P&gt;&lt;A href="https://www.jmp.com/support/help/en/17.2/#page/jmp/construct-a-modal-window.shtml" target="_blank" rel="noopener"&gt; Scripting Guide &amp;gt; Display Trees &amp;gt; Modal Windows in JSL &amp;gt; Construct a Modal Window&lt;/A&gt; gives explanation of new windows using modal. And this should give an example where to place commands to get values into variables&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);
nw = New Window("Example", &amp;lt;&amp;lt;modal, &amp;lt;&amp;lt;return result,
	Panel Box("Options",
		cb = Check Box({"One", "Two", "Three"})
	),
	Panel Box("Actions",
		Lineup Box(N Col(2),
			Button Box("OK",
				cb_sel = cb &amp;lt;&amp;lt; get selected;
			),
			Button Box("Cancel")
		)
	)
);

If(nw["Button"] != 1,
	stop();
);

show(cb);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;You could also place that to &amp;lt;&amp;lt; On Validate or &amp;lt;&amp;lt; On Close (see Scripting Index for example and some explanation) but I usually place them inside the OK button.&lt;/P&gt;</description>
      <pubDate>Wed, 13 Dec 2023 16:42:04 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-get-check-boxes-to-be-change-or-become-visible-or-active/m-p/709001#M89295</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2023-12-13T16:42:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to get check boxes to be change (or become visible or active) based on a previous selection in a modal window?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-get-check-boxes-to-be-change-or-become-visible-or-active/m-p/709019#M89297</link>
      <description>&lt;P&gt;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/14366"&gt;@jthi&lt;/a&gt;, Thanks.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;show(cb_sel);&lt;/LI-CODE&gt;&lt;P&gt;works.&lt;/P&gt;</description>
      <pubDate>Wed, 13 Dec 2023 17:20:27 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-get-check-boxes-to-be-change-or-become-visible-or-active/m-p/709019#M89297</guid>
      <dc:creator>Neo</dc:creator>
      <dc:date>2023-12-13T17:20:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to get check boxes to be change (or become visible or active) based on a previous selection in a modal window?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-get-check-boxes-to-be-change-or-become-visible-or-active/m-p/709028#M89299</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;While I am on this topic (and not creating a new thread asking a new but related question), I am wondering if it is possible to show a text showing the user what each test stage did when the user selects it. Example pasted below.&amp;nbsp; Text only shows when selection is made and remains until unchecked.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Neo_0-1702488383263.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/59636i8F72FD1BE4DCB6E2/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Neo_0-1702488383263.png" alt="Neo_0-1702488383263.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Dec 2023 17:27:57 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-get-check-boxes-to-be-change-or-become-visible-or-active/m-p/709028#M89299</guid>
      <dc:creator>Neo</dc:creator>
      <dc:date>2023-12-13T17:27:57Z</dc:date>
    </item>
  </channel>
</rss>

