<?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: Why can't I get CalendarBox values from inside an IfBox in a modal window? in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Why-can-t-I-get-CalendarBox-values-from-inside-an-IfBox-in-a/m-p/916517#M107692</link>
    <description>&lt;P&gt;Did you verify that the issue is ifbox + calendar box?&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);

nw = New Window("Query.jsl",
	&amp;lt;&amp;lt;Modal,
	&amp;lt;&amp;lt;Return Result,
	cb1 = Calendar Box()
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;My guess is that &amp;lt;&amp;lt; Return Result which you can use to get the results from Modal Window inputs doesn't just work with Calendar Box() so it will return Empty().&lt;/P&gt;</description>
    <pubDate>Wed, 03 Dec 2025 18:59:30 GMT</pubDate>
    <dc:creator>jthi</dc:creator>
    <dc:date>2025-12-03T18:59:30Z</dc:date>
    <item>
      <title>Why can't I get CalendarBox values from inside an IfBox in a modal window?</title>
      <link>https://community.jmp.com/t5/Discussions/Why-can-t-I-get-CalendarBox-values-from-inside-an-IfBox-in-a/m-p/916430#M107685</link>
      <description>&lt;P&gt;I'm using JMP 19. I have a modal window with an interactive user interface. Inside that interface the user chooses some dates and I want to use those dates when they close the window.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I can get the value of a RadioBox or a TextEditBox, so why does the CalendarBox show as Empty() when I try to get values from it?&lt;/P&gt;
&lt;DIV&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;QueryWindow = NewWindow("Query.jsl",
		&amp;lt;&amp;lt;Modal,
		&amp;lt;&amp;lt;Return Result,
		PanelBox("Test Data Query Builder",
			PanelBox("Database Info", TextBox("Connection Info", &amp;lt;&amp;lt;SetFontSize(6))),
			PanelBox("Date Range", 
						rb_DateOption = RadioBox({"From-To","From-to-Present","Wildcard"},&amp;lt;&amp;lt;SetFunction(
												Function({this},
													Sel1 = rb_DateOption &amp;lt;&amp;lt; GetSelected();
													if_From &amp;lt;&amp;lt; Set(Sel1 == "From-To"|Sel1 == "From-to-Present");
													if_To &amp;lt;&amp;lt; Set(Sel1 == "From-To");
													if_cb &amp;lt;&amp;lt; Set(Sel1 == "From-To"|Sel1 == "From-to-Present");
													))),
			LineupBox(NCol(2), if_From = IfBox(1,qw_From = CalendarBox(&amp;lt;&amp;lt;Date(Today()-In Days(180)), 
																	   &amp;lt;&amp;lt;Min Date(Parse Date("1/1/2000")), 
																	   &amp;lt;&amp;lt;Max Date(Today()-In Hours(12)),
																	   &amp;lt;&amp;lt;ShowTime(0)
																	   )
											   ), 
							   if_To = IfBox(1,qw_To = CalendarBox(&amp;lt;&amp;lt;Date(Today()), 
																   &amp;lt;&amp;lt;Min Date(qw_From), 
																   &amp;lt;&amp;lt;Max Date(Today()),
																   &amp;lt;&amp;lt;ShowTime(0)
																   )
											), 
							   if_cb = IfBox(1,TextBox("Dates are absolute in each time zone unless \!"To Present\!" is selected.",
										&amp;lt;&amp;lt;SetFontSize(8))),							   	
							   ),

			),
			PanelBox("Query Parameters",
				LineupBox(NCol(2), TextBox("Category        "), lb_Category = ListBox({"1","2"}, &amp;lt;&amp;lt;SetFontSize(8))),
				LineupBox(NCol(2), TextBox("Part Numbers"), tb_PartNums = TextEditBox("%", &amp;lt;&amp;lt;SetNLines(3), &amp;lt;&amp;lt;SetWidth(200))),
			),		
		)
	);
	
show(QueryWindow["tb_PartNums"]);
show(QueryWindow["rb_DateOption"]);
show(QueryWindow["qw_From"]);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;/DIV&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Dec 2025 16:07:55 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Why-can-t-I-get-CalendarBox-values-from-inside-an-IfBox-in-a/m-p/916430#M107685</guid>
      <dc:creator>JasonWS</dc:creator>
      <dc:date>2025-12-03T16:07:55Z</dc:date>
    </item>
    <item>
      <title>Re: Why can't I get CalendarBox values from inside an IfBox in a modal window?</title>
      <link>https://community.jmp.com/t5/Discussions/Why-can-t-I-get-CalendarBox-values-from-inside-an-IfBox-in-a/m-p/916460#M107686</link>
      <description>&lt;P&gt;I have not studied this in a while, but it still seems to work&amp;nbsp;&lt;LI-MESSAGE title="Select Date Range with Calendar Boxes" uid="222980" url="https://community.jmp.com/t5/Uncharted/Select-Date-Range-with-Calendar-Boxes/m-p/222980#U222980" discussion_style_icon_css="lia-mention-container-editor-message lia-img-icon-blog-thread lia-fa-icon lia-fa-blog lia-fa-thread lia-fa"&gt;&lt;/LI-MESSAGE&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Dec 2025 16:31:31 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Why-can-t-I-get-CalendarBox-values-from-inside-an-IfBox-in-a/m-p/916460#M107686</guid>
      <dc:creator>Craige_Hales</dc:creator>
      <dc:date>2025-12-03T16:31:31Z</dc:date>
    </item>
    <item>
      <title>Re: Why can't I get CalendarBox values from inside an IfBox in a modal window?</title>
      <link>https://community.jmp.com/t5/Discussions/Why-can-t-I-get-CalendarBox-values-from-inside-an-IfBox-in-a/m-p/916463#M107687</link>
      <description>&lt;P&gt;&amp;lt;&amp;lt; Return Result might not work with &amp;lt;&amp;lt; Get Date which calendar box uses. Usually I don't rely just on &amp;lt;&amp;lt; Return Result and I always add OK/Cancel buttons to Modal windows and when you do this, you can add &amp;lt;&amp;lt; Get Date to the OK button for example&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;

QueryWindow = New Window("Query.jsl",
	&amp;lt;&amp;lt;Modal,
	&amp;lt;&amp;lt;Return Result,
	Panel Box("Test Data Query Builder",
		Panel Box("Database Info", Text Box("Connection Info", &amp;lt;&amp;lt;SetFontSize(6))),
		Panel Box("Date Range",
			rb_DateOption = Radio Box(
				{"From-To", "From-to-Present", "Wildcard"},
				&amp;lt;&amp;lt;SetFunction(
					Function({this},
						Sel1 = rb_DateOption &amp;lt;&amp;lt; GetSelected();
						if_From &amp;lt;&amp;lt; Set(Sel1 == "From-To" | Sel1 == "From-to-Present");
						if_To &amp;lt;&amp;lt; Set(Sel1 == "From-To");
						if_cb &amp;lt;&amp;lt; Set(Sel1 == "From-To" | Sel1 == "From-to-Present");
					)
				)
			),
			Lineup Box(N Col(2),
				if_From = If Box(
					1,
					qw_From = Calendar Box(
						&amp;lt;&amp;lt;Date(Today() - In Days(180)),
						&amp;lt;&amp;lt;Min Date(Parse Date("1/1/2000")),
						&amp;lt;&amp;lt;Max Date(Today() - In Hours(12)),
						&amp;lt;&amp;lt;ShowTime(0)
					)
				),
				if_To = If Box(1, qw_To = Calendar Box(&amp;lt;&amp;lt;Date(Today()), &amp;lt;&amp;lt;Min Date(qw_From), &amp;lt;&amp;lt;Max Date(Today()), &amp;lt;&amp;lt;ShowTime(0))),
				if_cb = If Box(1, Text Box("Dates are absolute in each time zone unless \!"To Present\!" is selected.", &amp;lt;&amp;lt;SetFontSize(8))),

			), 

		),
		Panel Box("Query Parameters",
			Lineup Box(N Col(2), Text Box("Category        "), lb_Category = List Box({"1", "2"}, &amp;lt;&amp;lt;SetFontSize(8))),
			Lineup Box(N Col(2), Text Box("Part Numbers"), tb_PartNums = Text Edit Box("%", &amp;lt;&amp;lt;SetNLines(3), &amp;lt;&amp;lt;SetWidth(200))),

		),
		Panel Box("Actions",
			Lineup Box(N Col(2),
				Button Box("OK",
					to = qw_to &amp;lt;&amp;lt; get date;
					from = qw_from &amp;lt;&amp;lt; get date;
				),
				Button Box("Cancel")
			)
		)
	)
);
	
Show(QueryWindow["tb_PartNums"]);
Show(QueryWindow["rb_DateOption"]);
Show(QueryWindow["qw_From"]);
show(to, from);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 03 Dec 2025 16:55:18 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Why-can-t-I-get-CalendarBox-values-from-inside-an-IfBox-in-a/m-p/916463#M107687</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2025-12-03T16:55:18Z</dc:date>
    </item>
    <item>
      <title>Re: Why can't I get CalendarBox values from inside an IfBox in a modal window?</title>
      <link>https://community.jmp.com/t5/Discussions/Why-can-t-I-get-CalendarBox-values-from-inside-an-IfBox-in-a/m-p/916502#M107688</link>
      <description>&lt;P&gt;I really appreciate the answer.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I was also able to do the same with OnValidate, though I would still like to know why the QueryWindow[] comes up as Empty(). I think that would help my understanding of what's preventing it from working both ways.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Dec 2025 18:33:08 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Why-can-t-I-get-CalendarBox-values-from-inside-an-IfBox-in-a/m-p/916502#M107688</guid>
      <dc:creator>JasonWS</dc:creator>
      <dc:date>2025-12-03T18:33:08Z</dc:date>
    </item>
    <item>
      <title>Re: Why can't I get CalendarBox values from inside an IfBox in a modal window?</title>
      <link>https://community.jmp.com/t5/Discussions/Why-can-t-I-get-CalendarBox-values-from-inside-an-IfBox-in-a/m-p/916517#M107692</link>
      <description>&lt;P&gt;Did you verify that the issue is ifbox + calendar box?&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);

nw = New Window("Query.jsl",
	&amp;lt;&amp;lt;Modal,
	&amp;lt;&amp;lt;Return Result,
	cb1 = Calendar Box()
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;My guess is that &amp;lt;&amp;lt; Return Result which you can use to get the results from Modal Window inputs doesn't just work with Calendar Box() so it will return Empty().&lt;/P&gt;</description>
      <pubDate>Wed, 03 Dec 2025 18:59:30 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Why-can-t-I-get-CalendarBox-values-from-inside-an-IfBox-in-a/m-p/916517#M107692</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2025-12-03T18:59:30Z</dc:date>
    </item>
    <item>
      <title>Re: Why can't I get CalendarBox values from inside an IfBox in a modal window?</title>
      <link>https://community.jmp.com/t5/Discussions/Why-can-t-I-get-CalendarBox-values-from-inside-an-IfBox-in-a/m-p/916524#M107695</link>
      <description>&lt;P&gt;Oh, it didn't work either way, IfBox(CalendarBox()) or CalendarBox(). I had to use the buttons or OnValidate.&lt;/P&gt;</description>
      <pubDate>Wed, 03 Dec 2025 20:00:53 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Why-can-t-I-get-CalendarBox-values-from-inside-an-IfBox-in-a/m-p/916524#M107695</guid>
      <dc:creator>JasonWS</dc:creator>
      <dc:date>2025-12-03T20:00:53Z</dc:date>
    </item>
  </channel>
</rss>

