<?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 Disabling all or individual check boxes not able to be re-enabled with opposite method in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Disabling-all-or-individual-check-boxes-not-able-to-be-re/m-p/39654#M23191</link>
    <description>&lt;P&gt;I have two sets of check boxes and one is being used to control which options are enabled on the other. I seem to have run into an issue using Enable and Enable Item. If I have previously disabled all the checkboxes I am unable to enable them individually unless I enable them all first. Conversly, if I disable individual check boxes, it appears I am unable to enable them all at once.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As it is currently, if one machine is selected certain boxes disable. However, I am unable to get them to re-enable using Enable(1).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have attached the code for my window below. I am hoping there is something I am missing and I don't need to use enable items for everything as that will get cumbersome as I continue and if new machines are added in the future.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;New Window("XYZTEC Sensor Verification",
	&amp;lt;&amp;lt;Modal,
	Text Box("XYZTEC Sensor Verification", Set Font Style("Bold"), Set Font Size(16)),
	Text Box(" "),	// places blank line beneath title
	Text Box("Select Date Range:", Set Font Style("Bold Underline")),
	V List Box(
		H List Box(
			V List Box(
				Text Box("Start Date:"),
				sDate = Number Edit Box((Today() - 31536000), 9, &amp;lt;&amp;lt; Set Format(Format("m/d/y"))),
				Text Box(" "),	// places blank line spacer
				Text Box("Select Machine(s):", Set Font Style("Bold Underline")),
				machine =  Check Box({"Both","M-1517","M-1774"}, &amp;lt;&amp;lt; Set All(1))
			),
			V List Box(
				Text Box("          ")
			),
			V List Box(
				Text Box("End Date:"),
				eDate = Number Edit Box(Today(), 9, &amp;lt;&amp;lt; Set Format(Format("m/d/y"))),
				Text Box(" "),	// places blank line spacer
				Text Box("Select Sensor(s):", Set Font Style("Bold Underline")),
				sensor = Check Box({"Pull 100 gf", "Pull 1kgf", "Pull 100kgf", "RotatingShear 100 gf", "RotatingShear 1kgf", "RotatingShear 10kgf", "Shear 100kgf"}, &amp;lt;&amp;lt; Set All(1))
			)
		)
	),
	Text Box(" "),	// places blank line beneath check boxes
	H List Box (Button Box("OK", flag = 1), Button Box("Cancel", flag = 0)),
	
	// ---- formatting check boxes automatic enable/disable based on machine selection ----
	machine &amp;lt;&amp;lt; setFunction(
		Function({this, button},
			If (button == 1, 
				(If (this &amp;lt;&amp;lt; get(button), 
					(machine &amp;lt;&amp;lt; Set All(1); sensor &amp;lt;&amp;lt; Enable(1); sensor &amp;lt;&amp;lt; Set All(1)),
					(machine &amp;lt;&amp;lt; Set All(0); sensor &amp;lt;&amp;lt; Enable(0); sensor &amp;lt;&amp;lt; Set All(0)))
				),
				If (button == 2,
					(If (this &amp;lt;&amp;lt; get(button),
						(machine &amp;lt;&amp;lt; Set(1,0); sensor &amp;lt;&amp;lt; Enable(1); sensor &amp;lt;&amp;lt; Enable Item(3,0); sensor &amp;lt;&amp;lt; Enable Item(4,0); sensor &amp;lt;&amp;lt; Enable Item(5,0)),
						(machine &amp;lt;&amp;lt; Set(1,0); sensor &amp;lt;&amp;lt; Set All(0); sensor &amp;lt;&amp;lt; Enable(1); sensor &amp;lt;&amp;lt; Enable Item(2,0)))
					),
					If (button == 3,
						(If (this &amp;lt;&amp;lt; get(button),
							(machine &amp;lt;&amp;lt; Set(1,0); sensor &amp;lt;&amp;lt; Enable(1); sensor &amp;lt;&amp;lt; Enable Item(2,0)),
							(machine &amp;lt;&amp;lt; Set(1,0); sensor &amp;lt;&amp;lt; Set All(0); sensor &amp;lt;&amp;lt; Enable(1); sensor &amp;lt;&amp;lt; Enable Item(3,0); sensor &amp;lt;&amp;lt; Enable Item(4,0); sensor &amp;lt;&amp;lt; Enable Item(5,0)))
						),
						(sensor &amp;lt;&amp;lt; Enable(0); sensor &amp;lt;&amp;lt; Set All(0))
					)
				)
			)
		)
	)
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 25 May 2017 22:33:40 GMT</pubDate>
    <dc:creator>SG</dc:creator>
    <dc:date>2017-05-25T22:33:40Z</dc:date>
    <item>
      <title>Disabling all or individual check boxes not able to be re-enabled with opposite method</title>
      <link>https://community.jmp.com/t5/Discussions/Disabling-all-or-individual-check-boxes-not-able-to-be-re/m-p/39654#M23191</link>
      <description>&lt;P&gt;I have two sets of check boxes and one is being used to control which options are enabled on the other. I seem to have run into an issue using Enable and Enable Item. If I have previously disabled all the checkboxes I am unable to enable them individually unless I enable them all first. Conversly, if I disable individual check boxes, it appears I am unable to enable them all at once.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As it is currently, if one machine is selected certain boxes disable. However, I am unable to get them to re-enable using Enable(1).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have attached the code for my window below. I am hoping there is something I am missing and I don't need to use enable items for everything as that will get cumbersome as I continue and if new machines are added in the future.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;New Window("XYZTEC Sensor Verification",
	&amp;lt;&amp;lt;Modal,
	Text Box("XYZTEC Sensor Verification", Set Font Style("Bold"), Set Font Size(16)),
	Text Box(" "),	// places blank line beneath title
	Text Box("Select Date Range:", Set Font Style("Bold Underline")),
	V List Box(
		H List Box(
			V List Box(
				Text Box("Start Date:"),
				sDate = Number Edit Box((Today() - 31536000), 9, &amp;lt;&amp;lt; Set Format(Format("m/d/y"))),
				Text Box(" "),	// places blank line spacer
				Text Box("Select Machine(s):", Set Font Style("Bold Underline")),
				machine =  Check Box({"Both","M-1517","M-1774"}, &amp;lt;&amp;lt; Set All(1))
			),
			V List Box(
				Text Box("          ")
			),
			V List Box(
				Text Box("End Date:"),
				eDate = Number Edit Box(Today(), 9, &amp;lt;&amp;lt; Set Format(Format("m/d/y"))),
				Text Box(" "),	// places blank line spacer
				Text Box("Select Sensor(s):", Set Font Style("Bold Underline")),
				sensor = Check Box({"Pull 100 gf", "Pull 1kgf", "Pull 100kgf", "RotatingShear 100 gf", "RotatingShear 1kgf", "RotatingShear 10kgf", "Shear 100kgf"}, &amp;lt;&amp;lt; Set All(1))
			)
		)
	),
	Text Box(" "),	// places blank line beneath check boxes
	H List Box (Button Box("OK", flag = 1), Button Box("Cancel", flag = 0)),
	
	// ---- formatting check boxes automatic enable/disable based on machine selection ----
	machine &amp;lt;&amp;lt; setFunction(
		Function({this, button},
			If (button == 1, 
				(If (this &amp;lt;&amp;lt; get(button), 
					(machine &amp;lt;&amp;lt; Set All(1); sensor &amp;lt;&amp;lt; Enable(1); sensor &amp;lt;&amp;lt; Set All(1)),
					(machine &amp;lt;&amp;lt; Set All(0); sensor &amp;lt;&amp;lt; Enable(0); sensor &amp;lt;&amp;lt; Set All(0)))
				),
				If (button == 2,
					(If (this &amp;lt;&amp;lt; get(button),
						(machine &amp;lt;&amp;lt; Set(1,0); sensor &amp;lt;&amp;lt; Enable(1); sensor &amp;lt;&amp;lt; Enable Item(3,0); sensor &amp;lt;&amp;lt; Enable Item(4,0); sensor &amp;lt;&amp;lt; Enable Item(5,0)),
						(machine &amp;lt;&amp;lt; Set(1,0); sensor &amp;lt;&amp;lt; Set All(0); sensor &amp;lt;&amp;lt; Enable(1); sensor &amp;lt;&amp;lt; Enable Item(2,0)))
					),
					If (button == 3,
						(If (this &amp;lt;&amp;lt; get(button),
							(machine &amp;lt;&amp;lt; Set(1,0); sensor &amp;lt;&amp;lt; Enable(1); sensor &amp;lt;&amp;lt; Enable Item(2,0)),
							(machine &amp;lt;&amp;lt; Set(1,0); sensor &amp;lt;&amp;lt; Set All(0); sensor &amp;lt;&amp;lt; Enable(1); sensor &amp;lt;&amp;lt; Enable Item(3,0); sensor &amp;lt;&amp;lt; Enable Item(4,0); sensor &amp;lt;&amp;lt; Enable Item(5,0)))
						),
						(sensor &amp;lt;&amp;lt; Enable(0); sensor &amp;lt;&amp;lt; Set All(0))
					)
				)
			)
		)
	)
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 25 May 2017 22:33:40 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Disabling-all-or-individual-check-boxes-not-able-to-be-re/m-p/39654#M23191</guid>
      <dc:creator>SG</dc:creator>
      <dc:date>2017-05-25T22:33:40Z</dc:date>
    </item>
    <item>
      <title>Re: Disabling all or individual check boxes not able to be re-enabled with opposite method</title>
      <link>https://community.jmp.com/t5/Discussions/Disabling-all-or-individual-check-boxes-not-able-to-be-re/m-p/39771#M23273</link>
      <description>&lt;P&gt;I have revised my enable/disable code to only use enable items and it works better now.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, I still do not understand how I would set the sensor check boxes if multiple machine check boxes are selected. I have included by revised enable/disable code.&lt;/P&gt;&lt;P&gt;Is there an easier way to do this that I am unaware of?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;	machine &amp;lt;&amp;lt; setFunction(
		Function({this, button},
			If (button == 3,
				(If (this &amp;lt;&amp;lt; get(button),
					(machine &amp;lt;&amp;lt; Set(1,0); sensor &amp;lt;&amp;lt; Enable Item(1,1); sensor &amp;lt;&amp;lt; Enable Item(2,0); sensor &amp;lt;&amp;lt; Enable Item(3,1); sensor &amp;lt;&amp;lt; Enable Item(4,1); sensor &amp;lt;&amp;lt; Enable Item(5,1); sensor &amp;lt;&amp;lt; Enable Item(6,1); sensor &amp;lt;&amp;lt; Enable Item(7,1))
				)),
				If (button == 2,
					(If (this &amp;lt;&amp;lt; get(button),
						(machine &amp;lt;&amp;lt; Set(1,0); sensor &amp;lt;&amp;lt; Enable Item(1,1); sensor &amp;lt;&amp;lt; Enable Item(2,1); sensor &amp;lt;&amp;lt; Enable Item(3,0); sensor &amp;lt;&amp;lt; Enable Item(4,0); sensor &amp;lt;&amp;lt; Enable Item(5,0); sensor &amp;lt;&amp;lt; Enable Item(6,1); sensor &amp;lt;&amp;lt; Enable Item(7,1))
					)),
					If (button == 1,
						(If (this &amp;lt;&amp;lt; get(button),
							(machine &amp;lt;&amp;lt; Set All(1); sensor &amp;lt;&amp;lt; Enable Item(1,1); sensor &amp;lt;&amp;lt; Enable Item(2,1); sensor &amp;lt;&amp;lt; Enable Item(3,1); sensor &amp;lt;&amp;lt; Enable Item(4,1); sensor &amp;lt;&amp;lt; Enable Item(5,1); sensor &amp;lt;&amp;lt; Enable Item(6,1); sensor &amp;lt;&amp;lt; Enable Item(7,1); sensor &amp;lt;&amp;lt; Set All(1)),
							(machine &amp;lt;&amp;lt; Set All(0); sensor &amp;lt;&amp;lt; Enable Item(1,0); sensor &amp;lt;&amp;lt; Enable Item(2,0); sensor &amp;lt;&amp;lt; Enable Item(3,0); sensor &amp;lt;&amp;lt; Enable Item(4,0); sensor &amp;lt;&amp;lt; Enable Item(5,0); sensor &amp;lt;&amp;lt; Enable Item(6,0); sensor &amp;lt;&amp;lt; Enable Item(7,0); sensor &amp;lt;&amp;lt; Set All(0))
						))
					)
				)
			)
		)
	)&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 30 May 2017 19:14:23 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Disabling-all-or-individual-check-boxes-not-able-to-be-re/m-p/39771#M23273</guid>
      <dc:creator>SG</dc:creator>
      <dc:date>2017-05-30T19:14:23Z</dc:date>
    </item>
  </channel>
</rss>

