cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Browse apps to extend the software in the new JMP Marketplace
Choose Language Hide Translation Bar
mystylelife19
Level III

How to put value in spec limit column properties

Hi community, i'm trying my best to solve this but i failed again & again. Can someone tell me where is my mistake?

 

I want to put value text box in the spec limit column properties? I already tried so many times. If i

change

 {LSL(LowL), USL(HighL), Show Limits( 2 )}

into

 {LSL(500), USL(1000), Show Limits( 2 )}

it worked. But i don't want number, i want value in LowL & HighL. 

 

Here my full script

 

dt = Current Data Table();

// Get the all column names from the data table
columnNames = dt << Get Column Names("String");

// Choose the specific column
cl = New Window("Column Selection", <<Modal,
    HListBox(
		  Panel Box("Make a selection",
			VlistBox(
			  usropt = RadioBox(columnNames, 
			     prmtr=usropt<<get
					)
				)
			)	
		)
	);

//Text Box Put value spec limit Upper & Lower

wd = New Window( "Spec Limit", << modal(),
	hlistbox(
		Text Box( "HighL:" ),
		High_Limit = Text Edit Box( "",<<set width( 90 ) ),
	),
	Button Box( "OK", 
		HighL = High_Limit << get number();
			
		)
	);
	
		
wd = New Window( "Spec Limit", << modal(),
	hlistbox(
		Text Box( "LowL:" ),
		Low_Limit = Text Edit Box( "",<<set width( 90 ) ),
	),
	Button Box( "OK", 
		LowL = Low_Limit << get number();
	
		)
	);

//Put value Spec Limit on choosen column

col = Column(prmtr);
col << Add Column Properties(
    Set Property(
    "Spec Limits",
    {LSL(LowL), USL(HighL), Show Limits( 2 )}
		
		)
	);

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
mystylelife19
Level III

Re: How to put value in spec limit column properties

UPDATE!!!

After research all the topic in this community i already solve this with research apply all the method given every solution given. Thank god i solve this with helper from god. Alhamdulillah

 

Here my scripts 

 

// Open a data table or replace "Data Table Name" with the name of your data table
dt = Current Data Table();

// Get the all column names from the data table
columnNames = dt << Get Column Names("String");

// Choose the specific column
cl = New Window("Column Selection", <<Modal,
    HListBox(
		  Panel Box("Make a selection",
			VlistBox(
			  allcolumn = RadioBox(columnNames, 
			     prmtr=allcolumn<<get
					)
				)
			)	
		)
	);

//Text Box Put value spec limit Upper & Lower


wd = New Window( "Spec Limit", << modal(),
	hlistbox(
		Text Box( "HighL:" ),
		High_Limit = Number Edit Box( "",<<set width( 10 ) ),
	),
	Button Box( "OK", 
		HighL=High_Limit<<get;
		)
	);
	
// If cancel or X was clicked, stop the script
If( wd == {Button( -1 )}, Stop() );	
		
wd = New Window( "Spec Limit", << modal(),
	hlistbox(
		Text Box( "LowL:" ),
		Low_Limit = Number Edit Box( "",<<set width( 10 ) ),
	),
	Button Box( "OK", 
		LowL=Low_Limit<<get;
		)
	);

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



//Put value Spec Limit on choosen column

col = Column(prmtr);

Eval(
	Substitute(
			Expr(
				col << Add Column Properties(
				Set Property(
				"Spec Limits",
				Eval(	{LSL(low), USL(high), Show Limits( 2 )})
				),
			)
		),
	Expr(low), LowL,
	Expr(high), HighL
	)
);

View solution in original post

4 REPLIES 4
jthi
Super User

Re: How to put value in spec limit column properties

You will have to evaluate the values Insert one expression into another using Eval Insert, Eval Expr, Parse, and Substitute . One option is something like this

Eval(EvalExpr(
	col << Add Column Properties(
		Set Property(
			"Spec Limits",
			{LSL(Expr(LowL)), USL(Expr(HighL)), Show Limits(2)}
			
		)
	)
));
-Jarmo
mystylelife19
Level III

Re: How to put value in spec limit column properties

Still did not work for me. The value from text box did not getting into the spec limit.

jthi
Super User

Re: How to put value in spec limit column properties

This does work for me

Names Default To Here(1);

// Open a data table or replace "Data Table Name" with the name of your data table
dt = Current Data Table();

// Get the all column names from the data table
columnNames = dt << Get Column Names("String");

// Choose the specific column
cl = New Window("Column Selection",
	<<Modal,
	H List Box(
		Panel Box("Make a selection",
			V List Box(allcolumn = Radio Box(columnNames, prmtr = allcolumn << get))
		)
	)
);

//Text Box Put value spec limit Upper & Lower


wd = New Window("Spec Limit",
	<<modal(),
	H List Box(Text Box("HighL:"), High_Limit = Number Edit Box("", <<set width(10)), ),
	Button Box("OK", HighL = High_Limit << get)
);
	
// If cancel or X was clicked, stop the script
If(wd == {Button(-1)}, Stop());	
		
wd = New Window("Spec Limit",
	<<modal(),
	H List Box(Text Box("LowL:"), Low_Limit = Number Edit Box("", <<set width(10)), ),
	Button Box("OK", LowL = Low_Limit << get)
);

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



//Put value Spec Limit on choosen column

col = Column(prmtr);

Eval(EvalExpr(
	col << Add Column Properties(
		Set Property(
			"Spec Limits",
			{LSL(Expr(LowL)), USL(Expr(HighL)), Show Limits(2)}
			
		)
	)
));

Also if you would like to, you could combine all those selections into a single modal window

Names Default To Here(1);

dt = Current Data Table();
col_names = dt << Get Column Names("String", Continuous);

nw = New Window("Set Specs", << Modal,
	H List Box(
		Panel Box("Select Column",
			rb_col = Radio Box(col_names)
		),
		Panel Box("Select Limits",
			Lineup Box(N Col(2),
				Text Box("LSL: "),
				lsl_neb = Number Edit Box("", <<set width(10)),
				Text Box("USL: "),
				usl_neb = Number Edit Box("", <<set width(10))
			)
		),
		Panel Box("Actions",
			Lineup Box(N Col(1),
				Button Box("OK",
					lsl_val = lsl_neb << get;
					usl_val = usl_neb << get;
					sel_col = rb_col << get selected;
				),
				Button Box("Cancel")
			)
		)
	)
);

If(nw["Button"] != 1,
	Throw("Cancel pressed");
);

show(sel_col, lsl_val, usl_val);
-Jarmo
mystylelife19
Level III

Re: How to put value in spec limit column properties

UPDATE!!!

After research all the topic in this community i already solve this with research apply all the method given every solution given. Thank god i solve this with helper from god. Alhamdulillah

 

Here my scripts 

 

// Open a data table or replace "Data Table Name" with the name of your data table
dt = Current Data Table();

// Get the all column names from the data table
columnNames = dt << Get Column Names("String");

// Choose the specific column
cl = New Window("Column Selection", <<Modal,
    HListBox(
		  Panel Box("Make a selection",
			VlistBox(
			  allcolumn = RadioBox(columnNames, 
			     prmtr=allcolumn<<get
					)
				)
			)	
		)
	);

//Text Box Put value spec limit Upper & Lower


wd = New Window( "Spec Limit", << modal(),
	hlistbox(
		Text Box( "HighL:" ),
		High_Limit = Number Edit Box( "",<<set width( 10 ) ),
	),
	Button Box( "OK", 
		HighL=High_Limit<<get;
		)
	);
	
// If cancel or X was clicked, stop the script
If( wd == {Button( -1 )}, Stop() );	
		
wd = New Window( "Spec Limit", << modal(),
	hlistbox(
		Text Box( "LowL:" ),
		Low_Limit = Number Edit Box( "",<<set width( 10 ) ),
	),
	Button Box( "OK", 
		LowL=Low_Limit<<get;
		)
	);

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



//Put value Spec Limit on choosen column

col = Column(prmtr);

Eval(
	Substitute(
			Expr(
				col << Add Column Properties(
				Set Property(
				"Spec Limits",
				Eval(	{LSL(low), USL(high), Show Limits( 2 )})
				),
			)
		),
	Expr(low), LowL,
	Expr(high), HighL
	)
);