cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Discussions

Solve problems, and share tips and tricks with other JMP users.
%3CLINGO-SUB%20id%3D%22lingo-sub-695751%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%E5%90%8D%E7%A8%B1%E6%9C%AA%E8%A7%A3%E6%9E%90%EF%BC%9A%E5%AD%98%E5%8F%96%E6%88%96%E8%A9%95%E4%BC%B0%E4%B8%AD%E7%9A%84%E6%8C%89%E9%88%95%20JMP%20%E8%AD%A6%E5%A0%B1%E8%A8%8A%E6%81%AF%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-695751%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3E%E4%BD%A0%E5%A5%BD%EF%BC%8C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%E6%88%91%E6%83%B3%E7%9F%A5%E9%81%93%E6%82%A8%E6%98%AF%E5%90%A6%E5%8F%AF%E4%BB%A5%E5%B9%AB%E5%8A%A9%E6%88%91%E8%A7%A3%E6%B1%BA%E9%81%8B%E8%A1%8C%E4%BB%A5%E4%B8%8B%20jsl%20%E6%99%82%E6%94%B6%E5%88%B0%E7%9A%84%20JMP%20%E8%AD%A6%E5%A0%B1%E8%A8%8A%E6%81%AF%EF%BC%9A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3E%2F%2Fselect%20the%20data%20in%20the%20original%20data%20table%20%0ANames%20Default%20To%20Here(%201%20)%3B%0Adt%20%3D%20Current%20Data%20Table()%3B%0A%0A%2F%2Fcolumn%20names%20%0A%0A%0A%2F%2Fpart%201.%20ask%20user%20for%20column%20names%20in%20a%20new%20window%20nw1%0A%2F%2Fpossible%20Group%20column%20name%20(should%20be%20character)%20%0Agroupby_col_names%20%3D%20dt%20%26lt%3B%26lt%3B%20Get%20Column%20names(character%2C%20String)%3B%0A%2F%2Fpossible%20result%20column%20name%20(should%20be%20numeric)%0Anumeric_col_names%20%3D%20dt%20%26lt%3B%26lt%3B%20Get%20Column%20names(Numeric%2C%20String)%3B%0Anw1%20%3D%20New%20Window(%22Generate%20an%20EAC%20Table%22%2C%0A%20%26lt%3B%3CMODAL%3E%3C%2FMODAL%3E%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22kachveder_0-1699461751653.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22kachveder_0-1699461751653.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22kachveder_0-1699461751653.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22kachveder_0-1699461751653.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22kachveder_0-1699461751653.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F58460iD4DDD0DD5152A2EB%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22kachveder_0-1699461751653.png%22%20alt%3D%22kachveder_0-1699461751653.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%E7%95%B6%E6%88%91%E6%8C%89%E4%B8%8B%E2%80%9C%E7%A2%BA%E5%AE%9A%E2%80%9D%E6%99%82%EF%BC%8C%E5%AE%83%E6%9C%83%E9%81%8B%E8%A1%8C%E7%A8%8B%E5%BC%8F%E7%A2%BC%EF%BC%8C%E7%95%B6%E6%88%91%E6%8C%89%E2%80%9CX%E2%80%9D%E6%88%96%E2%80%9C%E5%8F%96%E6%B6%88%E2%80%9D%E6%99%82%EF%BC%8C%E7%A8%8B%E5%BC%8F%E7%A2%BC%E4%B8%8D%E6%9C%83%E9%81%8B%E8%A1%8C%E3%80%82%20%E6%89%80%E4%BB%A5%EF%BC%8C%E8%A9%B2%E8%A8%88%E5%8A%83%E6%AD%A3%E5%A6%82%E9%A0%90%E6%9C%9F%E7%9A%84%E9%82%A3%E6%A8%A3%E3%80%82%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSTRONG%3E%E4%BD%86%E6%88%91%E6%80%8E%E9%BA%BC%E8%83%BD%E8%AE%93%E9%80%99%E5%80%8B%20JMP%20%E8%AD%A6%E5%A0%B1%E6%B6%88%E5%A4%B1%E5%91%A2%EF%BC%9F%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-695751%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CLINGO-LABEL%3E%E8%87%AA%E5%8B%95%E5%8C%96%E5%92%8C%E8%85%B3%E6%9C%AC%E7%B7%A8%E5%AF%AB%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3E%E8%98%8B%E6%9E%9C%E7%B3%BB%E7%B5%B1%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3E%E5%A4%A7%E8%A6%8F%E6%A8%A1%E5%AE%A2%E8%A3%BD%E5%8C%96%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3E%E8%A6%96%E7%AA%97%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-695829%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%E5%9B%9E%E8%A6%86%EF%BC%9A%E5%90%8D%E7%A8%B1%E6%9C%AA%E8%A7%A3%E6%9E%90%EF%BC%9A%E5%AD%98%E5%8F%96%E6%88%96%E8%A9%95%E4%BC%B0%E6%8C%89%E9%88%95%20JMP%20%E8%AD%A6%E5%A0%B1%E8%A8%8A%E6%81%AF%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-695829%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3E%E6%B6%88%E9%99%A4%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3E%20%20%20nw1%20%26lt%3B%26lt%3B%20close%20window%3B%0A%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%E5%BE%9E%E2%80%9C%E7%A2%BA%E5%AE%9A%E2%80%9D%E6%8C%89%E9%88%95%EF%BC%88%E8%A6%96%E7%AA%97%E5%B0%87%E8%87%AA%E5%8B%95%E9%97%9C%E9%96%89%EF%BC%8C%E5%9B%A0%E7%82%BA%E5%AE%83%E6%98%AF%E6%A8%A1%E5%BC%8F%E8%A6%96%E7%AA%97%EF%BC%89%E3%80%82%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%E9%80%9A%E5%B8%B8%E7%95%B6%E6%88%91%E8%88%87%E6%A8%A1%E6%85%8B%E8%A6%96%E7%AA%97%E9%80%B2%E8%A1%8C%E6%AF%94%E8%BC%83%E6%99%82%EF%BC%8C%E6%88%91%E5%82%BE%E5%90%91%E6%96%BC%E4%BD%BF%E7%94%A8%20%26lt%3B%26lt%3B%20%E8%BF%94%E5%9B%9E%E7%B5%90%E6%9E%9C%EF%BC%8C%E7%84%B6%E5%BE%8C%E6%AA%A2%E6%9F%A5%20window_ref%5B%22Button%22%5D%20!%3D%201%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
Choose Language Hide Translation Bar
kachveder
Level III

Name Unresolved: Button in access or evaluation JMP Alert Message

Hello, 

 

I was wondering if you could help me with this JMP Alert message I get when I run the following jsl: 

 

//select the data in the original data table 
Names Default To Here( 1 );
dt = Current Data Table();

//column names 


//part 1. ask user for column names in a new window nw1
//possible Group column name (should be character) 
groupby_col_names = dt << Get Column names(character, String);
//possible result column name (should be numeric)
numeric_col_names = dt << Get Column names(Numeric, String);
nw1 = New Window("Generate an EAC Table",
	<<Modal,
	Text Box ("Select the variable with the the historical group in it:"),
	groupby_col = Radio Box(groupby_col_names),
	Text Box ("Select the variable with the results:"), 
	result_col = Radio Box(numeric_col_names),
	H List Box(
		Button Box("OK", 
		answers = Eval List(
		{
			set_groupby = groupby_col << get selected, 
			set_resultcol = result_col << get selected
		}
		);
	nw1 << close window;
		),
	Button Box("Cancel")
		), 
	//change popup window size
	<<Size Window(500,400)
);	

// If cancel or red X was clicked, stop the script
If( nw1 == {Button( -1 )}, Stop() );

 

kachveder_0-1699461751653.png

 

When I press "OK" it runs the code, and when I "X" or "Cancel", the code is not run. So, the program is as intended.

 

But how can I get this JMP Alert to go away? 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
jthi
Super User

Re: Name Unresolved: Button in access or evaluation JMP Alert Message

Remove

 

			nw1 << close window;

from the "OK" button (window will be closed automatically as it is modal window).

 

Usually when I do comparison with modal windows, I tend to use << return result and then check for window_ref["Button"] != 1

 

-Jarmo

View solution in original post

1 REPLY 1
jthi
Super User

Re: Name Unresolved: Button in access or evaluation JMP Alert Message

Remove

 

			nw1 << close window;

from the "OK" button (window will be closed automatically as it is modal window).

 

Usually when I do comparison with modal windows, I tend to use << return result and then check for window_ref["Button"] != 1

 

-Jarmo

Recommended Articles