Subscribe Bookmark RSS Feed

Name Unresolved question

vincent_kane

New Contributor

Joined:

Jun 28, 2016

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

3 REPLIES
txnelson

Super User

Joined:

Jun 22, 2012

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

New Contributor

Joined:

Jun 28, 2016

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 );

Wendy_Murphrey

Joined:

Jun 23, 2011

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