cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
The Discovery Summit 2025 Call for Content is open! Submit an abstract today to present at our premier analytics conference.
See how to use JMP Live to centralize and share reports within groups. Webinar with Q&A April 4, 2pm ET.
Choose Language Hide Translation Bar
View Original Published Thread

Combo box editing

GregP
Level I

Good morning,

I'm stuck, I'm creating a combobox to pick a name from my data table and select all rows that match that name. However at this stage my combobox displays the names of each line and not a "summary" with. How can I do this? The goal is to select all the rows of this name and then extract it after selection in the combobox. Can my script be paused before selection?

 

Thanks very much

This post originally written in French and has been translated for your convenience. When you reply, it will also be translated back to French .

1 ACCEPTED SOLUTION

Accepted Solutions
frank_wang
Level IV


回复: Edition de combo box

Hi 

My suggestion as below. Hope it can help you.

Clear Globals();
Clear Log();

dt = Current Data Table();
//chef = dt:NOM << get values; 
Summarize( dt, chef = by( :NOM ) );
expr = Expr(
	dt << Select Where( :NOM == selection )
);
New Window( "Nom",
	cb = Combo Box(
		chef,
		selection = cb << GetSelected();
		expr;
	),

);
心若止水

View solution in original post

4 REPLIES 4
ErraticAttack
Level VI

Re: Edition de combo box

Associative Arrays have unique keys, so you can use them to get a list of unique items:

 

dt = Current Data Table();
chef = Associative Array( dt:NOM ) << Get Keys; 
New Window( "Nom",
	cb = Combo Box( chef,
		selection = cb << Get Selected();
	)
);
Jordan
GregP
Level I

Re: Edition de combo box

Merci beaucoup je vais regarder ce que cela donne

frank_wang
Level IV


回复: Edition de combo box

Hi 

My suggestion as below. Hope it can help you.

Clear Globals();
Clear Log();

dt = Current Data Table();
//chef = dt:NOM << get values; 
Summarize( dt, chef = by( :NOM ) );
expr = Expr(
	dt << Select Where( :NOM == selection )
);
New Window( "Nom",
	cb = Combo Box(
		chef,
		selection = cb << GetSelected();
		expr;
	),

);
心若止水
GregP
Level I

回复: Edition de combo box

C'est parfait. Je voudrais essayer de poursuivre le script pour extraire ces données. Je pensais créer un bouton en plus dans cette fenêtre pour valider et exécuter la suite du script?  Est ce que vous pensez que c'est la bonne solution?

 

Merci déjà pour cette solution je vais étudier les fonction pour la comprendre et la refaire plus tard.