<?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: Custom Dialog in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Custom-Dialog/m-p/847523#M102235</link>
    <description>&lt;P&gt;Looks like replacing&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Col List Box(&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;with&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Filter Col Selector(&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Does the trick.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Finished product looks like this.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dt = Current Data Table();
If( !Namespace Exists( "Custom Dialog" ),
	dialogRecallNS = New Namespace(
		"Custom Dialog",
		{
			ycolRecall =
			{
			}
			,
			orderRecall =
			{
			}
			,
			byRecall =
			{
			}
		}
	)
,
	dialogRecallNS = Namespace( "Custom Dialog" )
);
nc = N Col( dt );
lbWidth = 130;
pgm = Expr(
	nw = New Window( "Annotated Multiple Plots",
		For( i = 1, i &amp;lt;= N Items( exy ), i++,
			Notes = Try( Column( dt, exy[i] ) &amp;lt;&amp;lt; Get Property( "Notes" ) );
			Try(
				Bivariate(
					Y( exy[i] ),
					X( exx[1] ),
					SendToReport(
						Dispatch(
							{},
							"",
							AxisBox( 2 ),
							Add Text Annotation(
								Text( "Category: " || Notes ),
								Fixed Size( 0 ),
								Text Box( {-80, 25, 0, 50} ),
								Filled( 0 )
							)
						)
					)
				)
			);
		)
	)
);
clearRoles = Expr(
	colListY &amp;lt;&amp;lt; RemoveAll;
	colListX &amp;lt;&amp;lt; RemoveAll;
);
recallRoles = Expr(
	dialogRecallNS:ycolRecall = colListY &amp;lt;&amp;lt; GetItems;
	dialogRecallNS:orderRecall = colListX &amp;lt;&amp;lt; GetItems;
);
customDlg = New Window( "Example of a Custom Dialog",
	Border Box( Left( 3 ), top( 2 ),
		V List Box(
			Text Box( "Example dialog to demonstrate a Recall button" ),
			H List Box(
				V List Box(
					Panel Box( "Select Columns",
						colListData = Filter Col Selector(
							All,
							width( lbWidth ),
							nLines( Min( nc, 10 ) )
						)
					)
				),
				Panel Box( "Cast Selected Columns into Roles",
					Lineup Box( N Col( 2 ), Spacing( 3 ),
						Button Box( "Y",
							colListY &amp;lt;&amp;lt; Append( colListData &amp;lt;&amp;lt; GetSelected )
						),
						colListY = Col List Box(
							width( lbWidth ),
							nmin( 1 ),
							nLines( 5 ),
							numeric
						),
						Button Box( "X",
							colListX &amp;lt;&amp;lt; Append( colListData &amp;lt;&amp;lt; GetSelected )
						),
						colListX = Col List Box(
							width( lbWidth ),
							nLines( 1 ),
							numeric
						)
					)
				),
				Panel Box( "Action",
					Lineup Box( N Col( 1 ),
						Button Box( "OK",
							recallRoles;
							exy = colListY &amp;lt;&amp;lt; get items;
							exx = colListX &amp;lt;&amp;lt; get items;
							pgm;
							customDlg &amp;lt;&amp;lt; CloseWindow;
						),
						Button Box( "Cancel", customDlg &amp;lt;&amp;lt; CloseWindow ),
						Button Box( "Reset", clearRoles ),
						Text Box( " " ),
						Button Box( "Remove",
							colListY &amp;lt;&amp;lt; RemoveSelected;
							colListX &amp;lt;&amp;lt; RemoveSelected;
						),
						Button Box( "Recall",
							clearRoles;
							Try(
								colListY &amp;lt;&amp;lt; Append( dialogRecallNS:ycolRecall );
								colListX &amp;lt;&amp;lt; Append( dialogRecallNS:orderRecall );
							);
						)
					)
				)
			)
		)
	)
);
colListx &amp;lt;&amp;lt; set min items( 1 );
colListy &amp;lt;&amp;lt; set min items( 1 );&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 12 Mar 2025 14:35:12 GMT</pubDate>
    <dc:creator>SpannerHead</dc:creator>
    <dc:date>2025-03-12T14:35:12Z</dc:date>
    <item>
      <title>Custom Dialog</title>
      <link>https://community.jmp.com/t5/Discussions/Custom-Dialog/m-p/847361#M102211</link>
      <description>&lt;P&gt;I have a custom dialog script I find very useful but it has a small annoyance.&amp;nbsp; The script allows me to select parameters for a number of bivariate plots that will be annotated.&amp;nbsp; The one issue I have relates to the fact that I'm dealing with grouped columns and the selection dialog is blind to the grouping.&amp;nbsp; I have other dialogs that show the columns grouped, so I know it can work.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This works&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt = Current Data Table();
cdg = Column Dialog( exx = ColList( "X", Min Col( 1 ), Max Col( 1 ) ) );
cdg2 = Column Dialog( exy = ColList( "Y", Min Col( 1 ), Max Col( 1 ) ) );
Notes = cdg2["exy"][1] &amp;lt;&amp;lt; Get Property( "Notes" );
lstColGroups = dt &amp;lt;&amp;lt; get column groups names;
myColGroup = "";
For Each( {i}, lstColGroups,
	lstCols = dt &amp;lt;&amp;lt; get column group( i );
	If( Contains( lstCols, cdg2["exy"][1] ),
		myColGroup = i
	);
);
Graph Builder(
	Size( 798, 624 ),
	Show Control Panel( 1 ),
	Variables( X( cdg["exx"][1] ), Y( cdg2["exy"][1] ) ),
	Elements( Points( X, Y, Legend( 2 ) ), Smoother( X, Y, Legend( 3 ) ) ),
	SendToReport(
		Dispatch(
			{},
			"Graph Builder",
			FrameBox,
			{Add Text Annotation(
				Text( "Category: " || Notes ),
				Fixed Size( 0 ),
				Text Box( {1, -30, 382, 184} ),
				Filled( 0 )
			)}
		)
	)
);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;This does not&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 );
dt = Current Data Table();
If( !Namespace Exists( "Custom Dialog" ),
	dialogRecallNS = New Namespace(
		"Custom Dialog",
		{
			ycolRecall =
			{
			}
			,
			orderRecall =
			{
			}
			,
			byRecall =
			{
			}
		}
	)
,
	dialogRecallNS = Namespace( "Custom Dialog" )
);
nc = N Col( dt );
lbWidth = 130;
pgm = Expr(
	nw = New Window( "Annotated Multiple Plots",
		For( i = 1, i &amp;lt;= N Items( exy ), i++,
			Notes = Try( Column( dt, exy[i] ) &amp;lt;&amp;lt; Get Property( "Notes" ) );
			Try(
				Bivariate(
					Y( exy[i] ),
					X( exx[1] ),
					SendToReport(
						Dispatch(
							{},
							"",
							AxisBox( 2 ),
							Add Text Annotation(
								Text( "Category: " || Notes ),
								Fixed Size( 0 ),
								Text Box( {-80, 25, 0, 50} ),
								Filled( 0 )
							)
						)
					)
				)
			);
		)
	)
);
clearRoles = Expr(
	colListY &amp;lt;&amp;lt; RemoveAll;
	colListX &amp;lt;&amp;lt; RemoveAll;
);
recallRoles = Expr(
	dialogRecallNS:ycolRecall = colListY &amp;lt;&amp;lt; GetItems;
	dialogRecallNS:orderRecall = colListX &amp;lt;&amp;lt; GetItems;
);
customDlg = New Window( "Enter Variables",
	Border Box( Left( 3 ), top( 2 ),
		V List Box(
			Text Box( "Bivariate Modeling" ), 
			H List Box(
				V List Box(
					Panel Box( "Select Columns",
						colListData = Col List Box(
							All,
							width( lbWidth ),
							nLines( Min( nc, 10 ) )
						)
					)
				),
				Panel Box( "Cast Selected Columns into Roles",
					Lineup Box( N Col( 2 ), Spacing( 3 ),
						Button Box( "Y",
							colListY &amp;lt;&amp;lt; Append( colListData &amp;lt;&amp;lt; GetSelected )
						),
						colListY = Col List Box(
							width( lbWidth ),
							nmin( 1 ),
							nLines( 5 ),
							numeric
						),
						Button Box( "X",
							colListX &amp;lt;&amp;lt; Append( colListData &amp;lt;&amp;lt; GetSelected )
						),
						colListX = Col List Box(
							width( lbWidth ),
							nLines( 1 ),
							numeric
						)
					)
				),
				Panel Box( "Action",
					Lineup Box( N Col( 1 ),
						Button Box( "OK",
							recallRoles;
							exy = colListY &amp;lt;&amp;lt; get items;
							exx = colListX &amp;lt;&amp;lt; get items;
							pgm;
							customDlg &amp;lt;&amp;lt; CloseWindow;
						),
						Button Box( "Cancel", customDlg &amp;lt;&amp;lt; CloseWindow ),
						Button Box( "Reset", clearRoles ),
						Text Box( " " ),
						Button Box( "Remove",
							colListY &amp;lt;&amp;lt; RemoveSelected;
							colListX &amp;lt;&amp;lt; RemoveSelected;
						),
						Button Box( "Recall",
							clearRoles;
							Try(
								colListY &amp;lt;&amp;lt; Append( dialogRecallNS:ycolRecall );
								colListX &amp;lt;&amp;lt; Append( dialogRecallNS:orderRecall );
							);
						)
					)
				)
			)
		)
	)
);
colListx &amp;lt;&amp;lt; set min items( 1 );
colListy &amp;lt;&amp;lt; set min items( 1 );&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SpannerHead_0-1741715084704.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/73755i2676C5E4C2A61DD4/image-size/medium?v=v2&amp;amp;px=400" role="button" title="SpannerHead_0-1741715084704.png" alt="SpannerHead_0-1741715084704.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 11 Mar 2025 17:45:02 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Custom-Dialog/m-p/847361#M102211</guid>
      <dc:creator>SpannerHead</dc:creator>
      <dc:date>2025-03-11T17:45:02Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Dialog</title>
      <link>https://community.jmp.com/t5/Discussions/Custom-Dialog/m-p/847520#M102233</link>
      <description>&lt;P&gt;I figured out that&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Column Dialog(&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;allows me to see the categories.&amp;nbsp; However, it is not clear where I would add this in the dysfunctional script to get it fixed?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 12 Mar 2025 13:58:52 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Custom-Dialog/m-p/847520#M102233</guid>
      <dc:creator>SpannerHead</dc:creator>
      <dc:date>2025-03-12T13:58:52Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Dialog</title>
      <link>https://community.jmp.com/t5/Discussions/Custom-Dialog/m-p/847523#M102235</link>
      <description>&lt;P&gt;Looks like replacing&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Col List Box(&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;with&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Filter Col Selector(&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Does the trick.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Finished product looks like this.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dt = Current Data Table();
If( !Namespace Exists( "Custom Dialog" ),
	dialogRecallNS = New Namespace(
		"Custom Dialog",
		{
			ycolRecall =
			{
			}
			,
			orderRecall =
			{
			}
			,
			byRecall =
			{
			}
		}
	)
,
	dialogRecallNS = Namespace( "Custom Dialog" )
);
nc = N Col( dt );
lbWidth = 130;
pgm = Expr(
	nw = New Window( "Annotated Multiple Plots",
		For( i = 1, i &amp;lt;= N Items( exy ), i++,
			Notes = Try( Column( dt, exy[i] ) &amp;lt;&amp;lt; Get Property( "Notes" ) );
			Try(
				Bivariate(
					Y( exy[i] ),
					X( exx[1] ),
					SendToReport(
						Dispatch(
							{},
							"",
							AxisBox( 2 ),
							Add Text Annotation(
								Text( "Category: " || Notes ),
								Fixed Size( 0 ),
								Text Box( {-80, 25, 0, 50} ),
								Filled( 0 )
							)
						)
					)
				)
			);
		)
	)
);
clearRoles = Expr(
	colListY &amp;lt;&amp;lt; RemoveAll;
	colListX &amp;lt;&amp;lt; RemoveAll;
);
recallRoles = Expr(
	dialogRecallNS:ycolRecall = colListY &amp;lt;&amp;lt; GetItems;
	dialogRecallNS:orderRecall = colListX &amp;lt;&amp;lt; GetItems;
);
customDlg = New Window( "Example of a Custom Dialog",
	Border Box( Left( 3 ), top( 2 ),
		V List Box(
			Text Box( "Example dialog to demonstrate a Recall button" ),
			H List Box(
				V List Box(
					Panel Box( "Select Columns",
						colListData = Filter Col Selector(
							All,
							width( lbWidth ),
							nLines( Min( nc, 10 ) )
						)
					)
				),
				Panel Box( "Cast Selected Columns into Roles",
					Lineup Box( N Col( 2 ), Spacing( 3 ),
						Button Box( "Y",
							colListY &amp;lt;&amp;lt; Append( colListData &amp;lt;&amp;lt; GetSelected )
						),
						colListY = Col List Box(
							width( lbWidth ),
							nmin( 1 ),
							nLines( 5 ),
							numeric
						),
						Button Box( "X",
							colListX &amp;lt;&amp;lt; Append( colListData &amp;lt;&amp;lt; GetSelected )
						),
						colListX = Col List Box(
							width( lbWidth ),
							nLines( 1 ),
							numeric
						)
					)
				),
				Panel Box( "Action",
					Lineup Box( N Col( 1 ),
						Button Box( "OK",
							recallRoles;
							exy = colListY &amp;lt;&amp;lt; get items;
							exx = colListX &amp;lt;&amp;lt; get items;
							pgm;
							customDlg &amp;lt;&amp;lt; CloseWindow;
						),
						Button Box( "Cancel", customDlg &amp;lt;&amp;lt; CloseWindow ),
						Button Box( "Reset", clearRoles ),
						Text Box( " " ),
						Button Box( "Remove",
							colListY &amp;lt;&amp;lt; RemoveSelected;
							colListX &amp;lt;&amp;lt; RemoveSelected;
						),
						Button Box( "Recall",
							clearRoles;
							Try(
								colListY &amp;lt;&amp;lt; Append( dialogRecallNS:ycolRecall );
								colListX &amp;lt;&amp;lt; Append( dialogRecallNS:orderRecall );
							);
						)
					)
				)
			)
		)
	)
);
colListx &amp;lt;&amp;lt; set min items( 1 );
colListy &amp;lt;&amp;lt; set min items( 1 );&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 12 Mar 2025 14:35:12 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Custom-Dialog/m-p/847523#M102235</guid>
      <dc:creator>SpannerHead</dc:creator>
      <dc:date>2025-03-12T14:35:12Z</dc:date>
    </item>
  </channel>
</rss>

