cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • DownloadSemiconductor Toolkit: Tools to create wafer maps, add wafer geometry to graphics, explore die defects & compare wafers.
  • Discovery Summit 2026: Early User Edition - September 23-24.Register. It's free.
  • Use JMP Clinical with CDISC-compliant data. Review studies, ID safety and efficacy signals & communicate findings with interactive graphics. Register to see how. Aug. 27, 2 pm US ET.

Discussions

Solve problems, and share tips and tricks with other JMP users.
Choose Language Hide Translation Bar
PercentileBat71
Level III

Can't identify the problem

Hi ! 

I wanted to generate a list for a user so he ca choose the abscissa he wants (for a graph) here is the script : 

 

// Créer une liste des options pour la liste déroulante
options = {"Supplier", "Supplier_Quarter"};

// Créer une boîte de dialogue personnalisée avec une liste déroulante
dlg = New Window("Sélectionnez une abscisse de travail",
	<<Modal,
	V List Box(
		Text Box("Sélectionnez une valeur parmi la liste déroulante:"),
		comboBox = Combo Box(options),
		H List Box(
// Créer le bouton OK
			Button Box("OK", dlg << Close(comboBox << Get Selected)), 
// Créer le bouton Cancel
			Button Box("Cancel", dlg << Close(""))
		)
	)
);

// Récupérer la sélection de l'utilisateur
selection = dlg << Get Result;


Print("Vous avez sélectionné : " || Char(selection));

Edit (jthi 2024-08-11): added jsl formatting

 

 

Here is the problem : I have a message error : Name Unresolved: Button

 

What do I have to do to make it works without issues ?

1 REPLY 1
jthi
Super User

Re: Can't identify the problem

As you are using modal window, you don't have to close it otherwise. Also dlg doesn't exist after the window has been closed unless you use <<return result. Below is one option what you could do

Names Default To Here(1);

options = {"Supplier", "Supplier_Quarter"};

dlg = New Window("Sélectionnez une abscisse de travail",
	<<Modal,
	<<return result,
	V List Box(
		Text Box("Sélectionnez une valeur parmi la liste déroulante:"),
		comboBox = Combo Box(options),
		H List Box(
			Button Box("OK", selection = comboBox << Get Selected),
			Button Box("Cancel")
		)
	)
);

show(dlg);
if(dlg["Button"] != 1,
	Throw("Cancelled");
);


Print("Vous avez sélectionné : " || Char(selection));
-Jarmo

Recommended Articles