<?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: Recall Button in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Recall-Button/m-p/774134#M95570</link>
    <description>&lt;P&gt;This is really close and it works as described, however, the whole purpose was to have a way to force the graphs to have annotation based on the information in the notes and somehow that breaks in this revision.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Annotations turn up missing and the Notes themselves don't contain anything.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;			Notes = Try(exy[i] &amp;lt;&amp;lt; Get Property( "Notes" ));
			Show(Notes);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Any clue why that might be?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Slán&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;SpannerHead&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 19 Jul 2024 15:38:45 GMT</pubDate>
    <dc:creator>SpannerHead</dc:creator>
    <dc:date>2024-07-19T15:38:45Z</dc:date>
    <item>
      <title>Recall Button</title>
      <link>https://community.jmp.com/t5/Discussions/Recall-Button/m-p/774001#M95551</link>
      <description>&lt;P&gt;I posted this question on the original thread but it was probably not highlighted properly, so trying as a fresh post.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The code at this link looks very useful&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.jmp.com/t5/JMP-Knowledge-Base/How-to-create-a-Recall-button-on-a-custom-window/tac-p/772821#M368" target="_blank"&gt;How to create a Recall button on a custom window - JMP User Community&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, it's not obvious to me how to capitalise on the recall function properly.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have some code (below) I borrowed and modified that lacks recall and I was trying to figure out how to weld them together.&amp;nbsp; I'm close but missing something as usual.&amp;nbsp; All help appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt = Current Data Table();
cd = Column Dialog(
	exy = ColList( "Y", Min Col( 1 ) ),
	exx = ColList( "X", Min Col( 1 ) )
);
Eval( cd[1] );
Eval( cd[2] );
yyy = Expr( y() );
xxx = Expr( x() );
xval = exx[1];
For( i = 1, i &amp;lt;= N Items( exy ), i++,
	Insert Into( yyy, exy[i] )
);
For( i = 1, i &amp;lt;= N Items( exx ), i++,
	Insert Into( xxx, exx[i] )
);
nw = New Window( "Annotated Multiple Plots",
	For( i = 1, i &amp;lt;= N Items( exy ), i++,
		Notes = 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 )
						)
					)
				)
			)
		);
	)
);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Slán&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;SpannerHead&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jul 2024 21:20:30 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Recall-Button/m-p/774001#M95551</guid>
      <dc:creator>SpannerHead</dc:creator>
      <dc:date>2024-07-18T21:20:30Z</dc:date>
    </item>
    <item>
      <title>Re: Recall Button</title>
      <link>https://community.jmp.com/t5/Discussions/Recall-Button/m-p/774016#M95554</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Slán,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;Below is a simple combining of your script with the script referenced in&amp;nbsp;&lt;FONT color="#0000FF"&gt;How to create a Recall button on a custom window.&amp;nbsp;&lt;/FONT&gt;&lt;/SPAN&gt;To start with, your provided example uses a Column Dialog() and the Recall Example uses a New Window for the user dialog.&amp;nbsp; JMP had depreciated the Column Dialog in favor of New Window.&amp;nbsp;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;FONT style="font-family: inherit;" color="#000000"&gt;What you need to do is to study the script and learn how it works.&amp;nbsp; &lt;FONT color="#333333"&gt;It brings in several items that will take some understanding.&amp;nbsp; &amp;nbsp;NameSpaces being a major one.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );

/* Assign dt to reference a table.  Open a sample table for demonstration purposes */
dt = Open( "$SAMPLE_DATA/Semiconductor Capability.jmp" );

/* Use a named namespace to hold the recall values */
If( !Namespace Exists( "Custom Dialog" ), // define namespace if it does not exist
	dialogRecallNS = New Namespace(
		"Custom Dialog",
		{
			ycolRecall =
			{
			}
			,
			orderRecall =
			{
			}
			,
			byRecall =
			{
			}
		}
	)
, // else get a reference to the existing namespace
	dialogRecallNS = Namespace( "Custom Dialog" )
);

nc = N Col( dt );
lbWidth = 130;

// The program to execute when the OK button is pressed
pgm = Expr(
	nw = New Window( "Annotated Multiple Plots",
		For( i = 1, i &amp;lt;= N Items( exy ), i++,
			Notes = Try( 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 )
							)
						)
					)
				)
			);
		)
	)
);

/* Expression to clear all current settings */ 
clearRoles = Expr(
	colListY &amp;lt;&amp;lt; RemoveAll;
	colListX &amp;lt;&amp;lt; RemoveAll;
);

/* Expression to store the current settings in global variables */ 
recallRoles = Expr(
	dialogRecallNS:ycolRecall = colListY &amp;lt;&amp;lt; GetItems;
	dialogRecallNS:orderRecall = colListX &amp;lt;&amp;lt; GetItems;
);

/* Custom Launch Window */ 
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 = 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;
							/* Restore any previous settings from the namespace variables */
							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;Please note that I removed several line of code in your supplied JSL that did not seem to do anything for the example.&lt;/P&gt;</description>
      <pubDate>Fri, 19 Jul 2024 01:00:42 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Recall-Button/m-p/774016#M95554</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2024-07-19T01:00:42Z</dc:date>
    </item>
    <item>
      <title>Re: Recall Button</title>
      <link>https://community.jmp.com/t5/Discussions/Recall-Button/m-p/774024#M95559</link>
      <description>&lt;P&gt;You can take inspiration from the script Jim provided and then apply &lt;LI-MESSAGE title="Recall Function Library" uid="49462" url="https://community.jmp.com/t5/JMP-Scripts/Recall-Function-Library/m-p/49462#U49462" discussion_style_icon_css="lia-mention-container-editor-message lia-img-icon-tkb-thread lia-fa-icon lia-fa-tkb lia-fa-thread lia-fa"&gt;&lt;/LI-MESSAGE&gt;&amp;nbsp;to that. That is most likely pretty great way of learning many different things for JSL (modify existing working solution to use different package). I don't personally like the way that recall library works so I haven't used it (I have my own in the making) but to my knowledge, it is currently the best way to implement recall without writing everything yourself.&lt;/P&gt;</description>
      <pubDate>Fri, 19 Jul 2024 06:36:23 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Recall-Button/m-p/774024#M95559</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2024-07-19T06:36:23Z</dc:date>
    </item>
    <item>
      <title>Re: Recall Button</title>
      <link>https://community.jmp.com/t5/Discussions/Recall-Button/m-p/774134#M95570</link>
      <description>&lt;P&gt;This is really close and it works as described, however, the whole purpose was to have a way to force the graphs to have annotation based on the information in the notes and somehow that breaks in this revision.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Annotations turn up missing and the Notes themselves don't contain anything.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;			Notes = Try(exy[i] &amp;lt;&amp;lt; Get Property( "Notes" ));
			Show(Notes);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Any clue why that might be?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Slán&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;SpannerHead&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 19 Jul 2024 15:38:45 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Recall-Button/m-p/774134#M95570</guid>
      <dc:creator>SpannerHead</dc:creator>
      <dc:date>2024-07-19T15:38:45Z</dc:date>
    </item>
    <item>
      <title>Re: Recall Button</title>
      <link>https://community.jmp.com/t5/Discussions/Recall-Button/m-p/774135#M95571</link>
      <description>&lt;P&gt;Try changing&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Notes = Try(exy[i] &amp;lt;&amp;lt; Get Property("Notes"));&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;to&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Notes = Try(Column(dt, exy[i]) &amp;lt;&amp;lt; Get Property("Notes"));
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;as &amp;lt;&amp;lt; Get items for Col List Box returns list of strings&lt;/P&gt;</description>
      <pubDate>Fri, 19 Jul 2024 15:51:18 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Recall-Button/m-p/774135#M95571</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2024-07-19T15:51:18Z</dc:date>
    </item>
    <item>
      <title>Re: Recall Button</title>
      <link>https://community.jmp.com/t5/Discussions/Recall-Button/m-p/774137#M95573</link>
      <description>&lt;P&gt;That's spot on, combining those works.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Slán&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;SpannerHead&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 19 Jul 2024 16:43:52 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Recall-Button/m-p/774137#M95573</guid>
      <dc:creator>SpannerHead</dc:creator>
      <dc:date>2024-07-19T16:43:52Z</dc:date>
    </item>
  </channel>
</rss>

