cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
JMP is taking Discovery online, April 16 and 18. Register today and join us for interactive sessions featuring popular presentation topics, networking, and discussions with the experts.
Choose Language Hide Translation Bar
vincent_kane
Level I

Name Unresolved question

Dlg = Dialog  ("Select Grill", 

vlist(Selection = listbox(GrillList),

button("OK")));

eval ( dlg [1]);

GrillSel = dlg ["Selection"];

Show( GrillSel );

An error popup message...Name Unresolved: Grillsel when GrillSel is used in a column formula.

Help is appreciated

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Name Unresolved question

Hi, Vincent.

There are a few things going on here.

1. Most importantly, the Dialog() function is deprecated.  I recommend that you convert to New Window() with the <<Modal option as described in the online documentation.

2. In the example you have provided, the result assigned to GrillSel is a list.  Most likely, you would need to extract the selected value from the list in order to use the value.

3. See JMP Usage Note 41824 for details regarding the use of a variable in a column formula.

I hope this helps.

Kind regards,

Wendy

Wendy

View solution in original post

3 REPLIES 3
txnelson
Super User

Re: Name Unresolved question

I am a bit confused.......but I will make a guess.  I get an error when the code is trying to find GrillList.

Assuming that GrillList is the name of a column in a data table, you will need to change the reference to it, to get the values from the data table

vlist(selection - listbox(:grillList<<get values),

Jim
vincent_kane
Level I

Re: Name Unresolved question

Jim:

Here is the script. When I use GrillSel in a column formula I get the error message. However, I do see the value of GrillSel in the log after a selection is made.

dt = datatable("Sales w Corrosion Updated");

GrillList = AssociativeArray(Column(dt, "Grill") << getValues) << getKeys;

SaleYrList = AssociativeArray(Column(dt, "Sales Year") << getValues) << getKeys;

ClaimYrList = AssociativeArray(Column(dt, "Global Year") << getValues) << getKeys;

PartList = AssociativeArray(Column(dt, "grill parts") << getValues) << getKeys;

Dlg = Dialog ("Select Grill",

vlist(Selection = listbox(GrillList),

button("OK")));

eval ( dlg );

GrillSel = dlg ["Selection"];

Show( GrillSel );

Re: Name Unresolved question

Hi, Vincent.

There are a few things going on here.

1. Most importantly, the Dialog() function is deprecated.  I recommend that you convert to New Window() with the <<Modal option as described in the online documentation.

2. In the example you have provided, the result assigned to GrillSel is a list.  Most likely, you would need to extract the selected value from the list in order to use the value.

3. See JMP Usage Note 41824 for details regarding the use of a variable in a column formula.

I hope this helps.

Kind regards,

Wendy

Wendy