<?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: Toggle button box or something similar in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Toggle-button-box-or-something-similar/m-p/809684#M99077</link>
    <description>&lt;P&gt;Button Box supports Toggle style&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);
New Window("Toggle Button Example",
	ex = Button Box("Start",
		If(ex &amp;lt;&amp;lt; Get,
			ex &amp;lt;&amp;lt; Set Button Name("Stop"),
			ex &amp;lt;&amp;lt; Set Button Name("Start")
		)
	)
);
ex &amp;lt;&amp;lt; Style("Toggle");&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jthi_0-1730822990356.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/69842i9E628ED527E04DCB/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jthi_0-1730822990356.png" alt="jthi_0-1730822990356.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jthi_1-1730822996996.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/69843iA519E5067E9EB6C7/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jthi_1-1730822996996.png" alt="jthi_1-1730822996996.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 05 Nov 2024 16:10:02 GMT</pubDate>
    <dc:creator>jthi</dc:creator>
    <dc:date>2024-11-05T16:10:02Z</dc:date>
    <item>
      <title>Toggle button box or something similar</title>
      <link>https://community.jmp.com/t5/Discussions/Toggle-button-box-or-something-similar/m-p/809673#M99073</link>
      <description>&lt;P&gt;Hi JMP Community,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; I'm trying to set up a window where users can select different months, or quarters, or the entire YTD, that also provides feedback of which button boxes have been selected (or even deselected). My intent is to ultimately use the month/quarter/YTD selection as a way to create a subset of a data table based on the month (year is always set to current year for now).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; Here's a window of what I'm thinking about:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SDF1_2-1730819595588.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/69834i03358635A1E94101/image-size/medium?v=v2&amp;amp;px=400" role="button" title="SDF1_2-1730819595588.png" alt="SDF1_2-1730819595588.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; Whenever a month is selected, the code will define a variable as "01" for Jan, "05" for May, or "1" for Q1, etc. What I'd like is for the button to look like it's either "clicked" by appearing pressed, or better turn a highlighted color, like blue. Something similar to what happens in the Data Filter platform, like when using Big Class and adding a local Data Filter by :name, where the name is highlighted and more than one selection can be made at a time. Along with showing that the button has been selected, I would like it to show if the button has been deselected -- much like a check box showing it's marked or not -- but I don't want to use check boxes as it's less visually appealing.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SDF1_1-1730819129226.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/69833i566A12D96BFCCB65/image-size/medium?v=v2&amp;amp;px=400" role="button" title="SDF1_1-1730819129226.png" alt="SDF1_1-1730819129226.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; The code for the window I created looks like (see below), and of course, when the user clicks on "OK", the code will then create the subset data table and then also close the selection window. In setting the variable for the month selected "mo#", is there a less cumbersome way to assign it the 01Jan2024 value than the code AsDate(Date DMY(dd,mm,yyyy))? it works just fine, it's just a bit cumbersome.&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 );

yr = Year( Today() );

subwin = New Window( "Select Subset",
	&amp;lt;&amp;lt;Type( "Dialog" ), &amp;lt;&amp;lt;Size(360,200),
	Panel Box( "Select Month(s) in Current Year for Subset",
		LB = Lineup Box( N Col( 5 ),
			Button Box( "Jan", mo1 = AsDate(Date DMY(01,01,eval(yr))) ),
			Button Box( "Feb", mo2 =  AsDate(Date DMY(01,02,eval(yr)))),
			Button Box( "March", mo3 = AsDate(Date DMY(01,03,eval(yr))) ),
			Spacer Box(),
			Button Box( "Q1", q = 1 ),
			Button Box( "April", mo4 = AsDate(Date DMY(01,04,eval(yr))) ),
			Button Box( "May", mo5 = AsDate(Date DMY(01,05,eval(yr))) ),
			Button Box( "June", mo6 = AsDate(Date DMY(01,06,eval(yr))) ),
			Spacer Box(),
			Button Box( "Q2", q = 2 ),
			Button Box( "July", mo7 = AsDate(Date DMY(01,07,eval(yr))) ),
			Button Box( "Aug", mo8 = AsDate(Date DMY(01,08,eval(yr))) ),
			Button Box( "Sep", mo9 = AsDate(Date DMY(01,09,eval(yr))) ),
			Spacer Box(),
			Button Box( "Q3", q = 3 ),
			Button Box( "Oct", m10 = AsDate(Date DMY(01,10,eval(yr))) ),
			Button Box( "Nov", m11 = AsDate(Date DMY(01,11,eval(yr))) ),
			Button Box( "Dec", m12 = AsDate(Date DMY(01,12,eval(yr))) ),
			Spacer Box(),
			Button Box( "Q4", q = 4 ),
			Button Box( "YTD", y = 12 ),
			Spacer Box(),
			Spacer Box(),
			Spacer Box(),
			Spacer Box(),
			Spacer Box(),
			Spacer Box(),
			Spacer Box(),
			Button Box("OK"),
			Button Box("Cancel/Exit", subwin &amp;lt;&amp;lt; Close Window)
		)
	)
);

&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp; Any help is much appreciated!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks!,&lt;/P&gt;
&lt;P&gt;DS&lt;/P&gt;</description>
      <pubDate>Tue, 05 Nov 2024 15:47:03 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Toggle-button-box-or-something-similar/m-p/809673#M99073</guid>
      <dc:creator>SDF1</dc:creator>
      <dc:date>2024-11-05T15:47:03Z</dc:date>
    </item>
    <item>
      <title>Re: Toggle button box or something similar</title>
      <link>https://community.jmp.com/t5/Discussions/Toggle-button-box-or-something-similar/m-p/809681#M99076</link>
      <description>&lt;P&gt;You might use radio buttons for this purpose. You could use one set to define whether the period is months or quarters. You could have another dynamic set to offer either the twelve months or the four quarters. Both options could be created when the window is opened, but one set (not the default) could be invisible. The first set of radio buttons would manage the visibility of the second set as well as the logic.&lt;/P&gt;</description>
      <pubDate>Tue, 05 Nov 2024 16:09:26 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Toggle-button-box-or-something-similar/m-p/809681#M99076</guid>
      <dc:creator>Mark_Bailey</dc:creator>
      <dc:date>2024-11-05T16:09:26Z</dc:date>
    </item>
    <item>
      <title>Re: Toggle button box or something similar</title>
      <link>https://community.jmp.com/t5/Discussions/Toggle-button-box-or-something-similar/m-p/809684#M99077</link>
      <description>&lt;P&gt;Button Box supports Toggle style&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);
New Window("Toggle Button Example",
	ex = Button Box("Start",
		If(ex &amp;lt;&amp;lt; Get,
			ex &amp;lt;&amp;lt; Set Button Name("Stop"),
			ex &amp;lt;&amp;lt; Set Button Name("Start")
		)
	)
);
ex &amp;lt;&amp;lt; Style("Toggle");&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jthi_0-1730822990356.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/69842i9E628ED527E04DCB/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jthi_0-1730822990356.png" alt="jthi_0-1730822990356.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jthi_1-1730822996996.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/69843iA519E5067E9EB6C7/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jthi_1-1730822996996.png" alt="jthi_1-1730822996996.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 05 Nov 2024 16:10:02 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Toggle-button-box-or-something-similar/m-p/809684#M99077</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2024-11-05T16:10:02Z</dc:date>
    </item>
    <item>
      <title>Re: Toggle button box or something similar</title>
      <link>https://community.jmp.com/t5/Discussions/Toggle-button-box-or-something-similar/m-p/809685#M99078</link>
      <description>&lt;P&gt;You can also group radio boxes so that only one will be active at any given time:&lt;/P&gt;
&lt;PRE&gt;Names Default To Here( 1 );
r1 = Radio Box( {"Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"} );
r2 = Radio Box( {"Q1", "Q2", "Q3", "Q4"} );
New Window( "Example", H List Box( r1, r2 ) );
r2 &amp;lt;&amp;lt; Group( r1 );&lt;/PRE&gt;</description>
      <pubDate>Tue, 05 Nov 2024 16:25:16 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Toggle-button-box-or-something-similar/m-p/809685#M99078</guid>
      <dc:creator>danschikore</dc:creator>
      <dc:date>2024-11-05T16:25:16Z</dc:date>
    </item>
    <item>
      <title>Re: Toggle button box or something similar</title>
      <link>https://community.jmp.com/t5/Discussions/Toggle-button-box-or-something-similar/m-p/809691#M99079</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&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;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; This definitely solved the toggle problem I was after. Now, the only challenge is how to set up the logic structure when someone clicks "OK" so that it will select only those mm/yyyy rows in the data table for all possible combinations of months selected or quarters, etc. Trying to think of a way that this doesn't get really big really fast. Any ideas?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks!,&lt;/P&gt;
&lt;P&gt;DS&lt;/P&gt;</description>
      <pubDate>Tue, 05 Nov 2024 16:39:09 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Toggle-button-box-or-something-similar/m-p/809691#M99079</guid>
      <dc:creator>SDF1</dc:creator>
      <dc:date>2024-11-05T16:39:09Z</dc:date>
    </item>
    <item>
      <title>Re: Toggle button box or something similar</title>
      <link>https://community.jmp.com/t5/Discussions/Toggle-button-box-or-something-similar/m-p/809696#M99080</link>
      <description>&lt;P&gt;Here is a rework of your JSL.....it really isn't tested, however it should be close enough for you to use it to complete your request&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );

dt=current data table();

theYear = Year( Today() );

resetbb = Expr(
	For( i = 1, i &amp;lt;= 17, i++,
		Eval( Parse( "bb" || Char( i ) || "&amp;lt;&amp;lt; enable(1);" ) )
	)
);

subwin = New Window( "Select Subset",
	&amp;lt;&amp;lt;Type( "Dialog" ),
	&amp;lt;&amp;lt;Size( 360, 200 ),
	Panel Box( "Select Month(s) in Current Year for Subset",
		LB = Lineup Box( N Col( 5 ),
			bb1 = Button Box( "Jan",
				Sel = "M1";
				resetbb;
				bb1 &amp;lt;&amp;lt; enable( 0 );
			),
			bb2 = Button Box( "Feb",
				Sel = "M2";
				resetbb;
				bb2 &amp;lt;&amp;lt; enable( 0 );
			),
			bb3 = Button Box( "March",
				Sel = "M3";
				resetbb;
				bb3 &amp;lt;&amp;lt; enable( 0 );
			),
			Spacer Box(),
			bb4 = Button Box( "Q1",
				Sel = "Q1";
				resetbb;
				bb4 &amp;lt;&amp;lt; enable( 0 );
			),
			bb5 = Button Box( "April",
				Sel = "M4";
				resetbb;
				bb5 &amp;lt;&amp;lt; enable( 0 );
			),
			bb6 = Button Box( "May",
				Sel = "M5";
				resetbb;
				bb6 &amp;lt;&amp;lt; enable( 0 );
			),
			bb7 = Button Box( "June",
				Sel = "M6";
				resetbb;
				bb7 &amp;lt;&amp;lt; enable( 0 );
			),
			Spacer Box(),
			bb8 = Button Box( "Q2",
				Sel = "Q2";
				resetbb;
				bb8 &amp;lt;&amp;lt; enable( 0 );
			),
			bb9 = Button Box( "July",
				Sel = "M7";
				resetbb;
				bb9 &amp;lt;&amp;lt; enable( 0 );
			),
			bb10 = Button Box( "Aug",
				Sel = "M8";
				resetbb;
				bb10 &amp;lt;&amp;lt; enable( 0 );
			),
			bb11 = Button Box( "Sep",
				Sel = "M9";
				resetbb;
				bb11 &amp;lt;&amp;lt; enable( 0 );
			),
			Spacer Box(),
			bb12 = Button Box( "Q3",
				Sel = "Q3";
				resetbb;
				bb12 &amp;lt;&amp;lt; enable( 0 );
			),
			bb13 = Button Box( "Oct",
				Sel = "M10";
				resetbb;
				bb13 &amp;lt;&amp;lt; enable( 0 );
			),
			bb14 = Button Box( "Nov",
				Sel = "M11";
				resetbb;
				bb14 &amp;lt;&amp;lt; enable( 0 );
			),
			bb15 = Button Box( "Dec",
				Sel = "M12";
				resetbb;
				bb15 &amp;lt;&amp;lt; enable( 0 );
			),
			Spacer Box(),
			bb16 = Button Box( "Q4",
				Sel = "Q4";
				resetbb;
				bb16 &amp;lt;&amp;lt; enable( 0 );
			),
			bb17 = Button Box( "YTD",
				Sel = "YTD";
				resetbb;
				bb17 &amp;lt;&amp;lt; enable( 0 );
			)
		),
		H List Box(
			Spacer Box(),
			Spacer Box(),
			Spacer Box(),
			Spacer Box(), 
			
			Button Box( "OK",
				If(
					Substr( Sel, 1, 1 ) == "M",
						theMonth = Num( Substr( Sel, 2 ) );
						startDate = Date MDY( theMonth, 1, theYear );
						If( theMonth == 12,
							endDate = Date MDY( 1, 1, theYear + 1 ),
							endDate = Date MDY( theMonth + 1, 1, theYear )
						);,
					Substr( Sel, 1, 1 ) == "Q",
						theMonth = Num(
							Substr( Sel, 2 );
							If(
								theMonth == 2,
									startDate = Date MDY( 4, 1, theYear );
									endDate = Date MDY( 7, 1, theYear );,
								theMonth == 3,
									startDate = Date MDY( 7, 1, theYear );
									endDate = Date MDY( 10, 1, theYear );,
								theMonth == 4,
									startDate = Date MDY( 10, 1, theYear );
									endDate = Date MDY( 1, 1, theYear + 1 );,
								startDate = Date MDY( 1, 1, theYear );
								endDate = Date MDY( 4, 1, theYear );,
							);,
							startDate = Date MDY( 1, 1, theYear );
							endDate = Today() + In Days( 1 );
						)
				);
				dt &amp;lt;&amp;lt; select where( startDate &amp;gt;= :Date &amp;lt; endDate );
				dtSubset = dt &amp;lt;&amp;lt; subset( selected columns( 0 ), selected rows( 1 ) );
				subwin &amp;lt;&amp;lt; Close Window;
			),
			Button Box( "Cancel/Exit", subwin &amp;lt;&amp;lt; Close Window )
		)
	)
);
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 05 Nov 2024 16:53:13 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Toggle-button-box-or-something-similar/m-p/809696#M99080</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2024-11-05T16:53:13Z</dc:date>
    </item>
    <item>
      <title>Re: Toggle button box or something similar</title>
      <link>https://community.jmp.com/t5/Discussions/Toggle-button-box-or-something-similar/m-p/809706#M99081</link>
      <description>&lt;P&gt;I'm not sure how your data looks like or how you do wish to perform the selections but I would separate the UI and logic. I made modifications to your UI but it isn't necessary, this just makes it a bit easier to collect the buttons. This will just demonstrate how you can build the dates from months, it won't do it for YTD or Quarters as I'm not sure how you will be using those&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);

get_dates = Expr(
	months = Loc(m_buttons &amp;lt;&amp;lt; get, 1);
	qs = Loc(q_buttons &amp;lt;&amp;lt; get, 1);
	ys = Loc(y_buttons &amp;lt;&amp;lt; get, 1);

	// loop over as necessary to create the combinations
	dates_to_find = Transform Each({month}, months,
		Date DMY(01, month, yr);
	);
);

yr = Year(Today());

subwin = New Window("Select Subset",
	&amp;lt;&amp;lt;Type("Dialog"),
	&amp;lt;&amp;lt;Size(360, 200),
	Panel Box("Select Month(s) in Current Year for Subset",
			V List Box(align("right"),
				H List Box(
					V List Box(
						lub_m = Lineup Box(N Col(3),
							Button Box("Jan"),
							Button Box("Feb"),
							Button Box("March"),
							Button Box("April"),
							Button Box("May"),
							Button Box("June"),
							Button Box("July"),
							Button Box("Aug"),
							Button Box("Sep"),
							Button Box("Oct"),
							Button Box("Nov"),
							Button Box("Dec")
						),
						lub_y = Lineup Box(N Col(1),
							btn_ytd = Button Box("YTD")							
						)
					),
				Spacer Box(Size(50,0)),
				lub_q = Lineup Box(N Col(1),
					Button Box("Q1"),
					Button Box("Q2"),
					Button Box("Q3"),
					Button Box("Q4")				
				),
			),
			Lineup Box(N Col(2),
				Button Box("OK",
					get_dates;
					show(dates_to_find);
				),
				Button Box("Cancel/Exit", subwin &amp;lt;&amp;lt; Close Window)
			)
		)
	)
);

btns = subwin &amp;lt;&amp;lt; XPath("//ButtonBox");
Remove From(btns, N Items(btns)-2, 2);
btns &amp;lt;&amp;lt; Style("Toggle");

// selections = Loc(btns &amp;lt;&amp;lt; get, 1);
// btns[selections] &amp;lt;&amp;lt; Get Button Name;

m_buttons = lub_m &amp;lt;&amp;lt; XPath("//ButtonBox");
q_buttons = lub_q &amp;lt;&amp;lt; XPath("//ButtonBox");
y_buttons = lub_y &amp;lt;&amp;lt; XPath("//ButtonBox");
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 05 Nov 2024 17:27:33 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Toggle-button-box-or-something-similar/m-p/809706#M99081</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2024-11-05T17:27:33Z</dc:date>
    </item>
    <item>
      <title>Re: Toggle button box or something similar</title>
      <link>https://community.jmp.com/t5/Discussions/Toggle-button-box-or-something-similar/m-p/809813#M99118</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/14366"&gt;@jthi&lt;/a&gt;&amp;nbsp;and&amp;nbsp;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/2687"&gt;@txnelson&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; Thank you both for the valuable feedback. All your suggestions gave me some ideas on what to work on and how to modify the existing code to get what I needed. I liked&amp;nbsp;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/2687"&gt;@txnelson&lt;/a&gt;&amp;nbsp;'s idea of the start date and end date, but unfortunately, it doesn't allow non-continuous selection of months and or quarters. For example, a user might select Jan and Sep as months or Q1 and Q4 as quarters to then grab the subset from. So, I had to rewrite that to allow for non-continuous dates. I even threw in a check if the user was selecting months and quarters or YTD and any mix so they'd have to go back and select just one group or another.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; My solution to this was actually to use Associative Arrays, and I was pleased with the outcome as well as utilizing AA's since I haven't really worked much with them. The code I came up with is below. I know it's not very elegant or compact, but it works and gets the job done, which is sometimes all that's needed, right?! ;)&lt;/img&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; Thanks for all the help and quick feedback. I love being able to pose a problem on this forum and then less than 24hrs later have a functioning script that solves all the concerns I needed. Below is the code I ended up writing:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );

dt = Current Data Table();

yr = Year( Today() );

MonthAA = Associative Array( {"M1", "M2", "M3", "M4", "M5", "M6", "M7", "M8", "M9", "M10", "M11", "M12"}, {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12} );
QAA = Associative Array( {"Q1", "Q2", "Q3", "Q4"}, {1, 2, 3, 4} );
YTDAA = Associative Array( {"YTD"}, {12} );

MonthList = {};
QList = {};
QMonths = {};
YTDList = {};

ClearExpr = Expr(
	dt &amp;lt;&amp;lt; Clear Select;
	MonthList = {};
	QList = {};
	QMonths = {};
	YTDList = {};
	BB1 &amp;lt;&amp;lt; Set( 0 );
	BB2 &amp;lt;&amp;lt; Set( 0 );
	BB3 &amp;lt;&amp;lt; Set( 0 );
	BB4 &amp;lt;&amp;lt; Set( 0 );
	BB5 &amp;lt;&amp;lt; Set( 0 );
	BB6 &amp;lt;&amp;lt; Set( 0 );
	BB7 &amp;lt;&amp;lt; Set( 0 );
	BB8 &amp;lt;&amp;lt; Set( 0 );
	BB9 &amp;lt;&amp;lt; Set( 0 );
	BB10 &amp;lt;&amp;lt; Set( 0 );
	BB11 &amp;lt;&amp;lt; Set( 0 );
	BB12 &amp;lt;&amp;lt; Set( 0 );
	BB13 &amp;lt;&amp;lt; Set( 0 );
	BB14 &amp;lt;&amp;lt; Set( 0 );
	BB15 &amp;lt;&amp;lt; Set( 0 );
	BB16 &amp;lt;&amp;lt; Set( 0 );
	BB17 &amp;lt;&amp;lt; Set( 0 );
);

OKExpr = Expr(
	dt &amp;lt;&amp;lt; Clear Select;
	MonthList = {};
	QList = {};
	QMonths = {};
	YTDList = {};
	For( i = 1, i &amp;lt;= 17, i++,
		tempBB = Eval( Parse( "BB" || Char( i ) ) ) &amp;lt;&amp;lt; Get;
		If( tempBB == 1,
			If(
				Substr( Eval( Parse( "Sel" || Char( i ) ) ), 1, 1 ) == "M", Insert Into( MonthList, Eval( Parse( "Sel" || Char( i ) ) ) ),
				Substr( Eval( Parse( "Sel" || Char( i ) ) ), 1, 1 ) == "Q", Insert Into( QList, Eval( Parse( "Sel" || Char( i ) ) ) ),
				Substr( Eval( Parse( "Sel" || Char( i ) ) ), 1, 1 ) == "Y", Insert Into( YTDList, Eval( Parse( "Sel" || Char( i ) ) ) )
			)
		);
	);
	If(
		N Items( MonthList ) != 0 &amp;amp; N Items( QList ) != 0 | N Items( MonthList ) != 0 &amp;amp; N Items( YTDList ) != 0 | N Items( QList ) != 0 &amp;amp;
		N Items( YTDList ) != 0,
		ErrorWin = New Window( "Error Window",
			&amp;lt;&amp;lt;Type( "Dialog" ),
			V List Box(
				Spacer Box(),
				Text Box( "Invalid selection. Please 'Clear' and select month(s), quarter(s), OR YTD.", &amp;lt;&amp;lt;Set Font Size( 16 ) ),
				H List Box( Spacer Box(), Button Box( "OK", ErrorWin &amp;lt;&amp;lt; Close Window ), Spacer Box() )
			)
		);
		Error = 1;
	,
		Error = 0
	);
	If( N Items( MonthList ) != 0 &amp;amp; Error == 0,
		MonthNum = MonthAA &amp;lt;&amp;lt; Get Values( MonthList );
		For( m = 1, m &amp;lt;= N Items( MonthList ), m++,
			dt &amp;lt;&amp;lt; Select Where( :"Month Year[Date]"n == As Date( Date DMY( 1, MonthNum[m], yr ) ), Current Selection( "extend" ) )
		);
		dtSubset = dt &amp;lt;&amp;lt; Subset( Selected Columns( 0 ), Selected Rows( 1 ), Suppress formula evaluation( 0 ) );
	);
	If( N Items( QList ) != 0 &amp;amp; Error == 0,
		QNum = QAA &amp;lt;&amp;lt; Get Values( QList );
		For( q = 1, q &amp;lt;= N Items( QNum ), q++,
			If(
				QNum[q] == 1, Insert Into( QMonths, {"M1", "M2", "M3"} ),
				QNum[q] == 2, Insert Into( QMonths, {"M4", "M5", "M6"} ),
				QNum[q] == 3, Insert Into( QMonths, {"M7", "M8", "M9"} ),
				QNum[q] == 4, Insert Into( QMonths, {"M10", "M11", "M12"} )
			)
		);
		MonthNum = MonthAA &amp;lt;&amp;lt; Get Values( QMonths );
		For( m = 1, m &amp;lt;= N Items( QMonths ), m++,
			dt &amp;lt;&amp;lt; Select Where( :"Month Year[Date]"n == As Date( Date DMY( 1, MonthNum[m], yr ) ), Current Selection( "extend" ) )
		);
		dtSubset = dt &amp;lt;&amp;lt; Subset( Selected Columns( 0 ), Selected Rows( 1 ), Suppress formula evaluation( 0 ) );
	);
	If( N Items( YTDList ) != 0 &amp;amp; Error == 0,
		YTDNum = YTDAA &amp;lt;&amp;lt; Get Values( YTDList );
		For( m = 1, m &amp;lt;= YTDNum[1], m++,
			dt &amp;lt;&amp;lt; Select Where( :"Month Year[Date]"n == As Date( Date DMY( 1, m, yr ) ), Current Selection( "extend" ) )
		);
		dtSubset = dt &amp;lt;&amp;lt; Subset( Selected Columns( 0 ), Selected Rows( 1 ), Suppress formula evaluation( 0 ) );
	);
);

subwin = New Window( "Select Subset",
	&amp;lt;&amp;lt;Type( "Dialog" ),
	&amp;lt;&amp;lt;Size( 380, 200 ),
	Panel Box( "Select Month(s) OR quarter(s) OR YTD in Current Year for Subset",
		LB = Lineup Box( N Col( 5 ),
			BB1 = Button Box( "Jan", Sel1 = "M1", &amp;lt;&amp;lt;Style( "Toggle" ) ),
			BB2 = Button Box( "Feb", Sel2 = "M2", &amp;lt;&amp;lt;Style( "Toggle" ) ),
			BB3 = Button Box( "March", Sel3 = "M3", &amp;lt;&amp;lt;Style( "Toggle" ) ),
			Spacer Box(),
			BB4 = Button Box( "Q1", Sel4 = "Q1", &amp;lt;&amp;lt;Style( "Toggle" ) ),
			BB5 = Button Box( "April", Sel5 = "M4", &amp;lt;&amp;lt;Style( "Toggle" ) ),
			BB6 = Button Box( "May", Sel6 = "M5", &amp;lt;&amp;lt;Style( "Toggle" ) ),
			BB7 = Button Box( "June", Sel7 = "M6", &amp;lt;&amp;lt;Style( "Toggle" ) ),
			Spacer Box(),
			BB8 = Button Box( "Q2", Sel8 = "Q2", &amp;lt;&amp;lt;Style( "Toggle" ) ),
			BB9 = Button Box( "July", Sel9 = "M7", &amp;lt;&amp;lt;Style( "Toggle" ) ),
			BB10 = Button Box( "Aug", Sel10 = "M8", &amp;lt;&amp;lt;Style( "Toggle" ) ),
			BB11 = Button Box( "Sep", Sel11 = "M9", &amp;lt;&amp;lt;Style( "Toggle" ) ),
			Spacer Box(),
			BB12 = Button Box( "Q3", Sel12 = "Q3", &amp;lt;&amp;lt;Style( "Toggle" ) ),
			BB13 = Button Box( "Oct", Sel13 = "M10", &amp;lt;&amp;lt;Style( "Toggle" ) ),
			BB14 = Button Box( "Nov", Sel14 = "M11", &amp;lt;&amp;lt;Style( "Toggle" ) ),
			BB15 = Button Box( "Dec", Sel15 = "M12", &amp;lt;&amp;lt;Style( "Toggle" ) ),
			Spacer Box(),
			BB16 = Button Box( "Q4", Sel16 = "Q4", &amp;lt;&amp;lt;Style( "Toggle" ) ),
			BB17 = Button Box( "YTD", Sel17 = "YTD", &amp;lt;&amp;lt;Style( "Toggle" ) ),
			Spacer Box(),
			Spacer Box(),
			Spacer Box(),
			Spacer Box(),
			Spacer Box(),
			Spacer Box(),
			Button Box( "Clear", ClearExpr ),
			Button Box( "OK", OKExpr ),
			Button Box( "Cancel/Exit", subwin &amp;lt;&amp;lt; Close Window )
		)
	)
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Thanks!,&lt;/P&gt;
&lt;P&gt;DS&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Nov 2024 15:41:50 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Toggle-button-box-or-something-similar/m-p/809813#M99118</guid>
      <dc:creator>SDF1</dc:creator>
      <dc:date>2024-11-06T15:41:50Z</dc:date>
    </item>
  </channel>
</rss>

