- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Combo box editing
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 .
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
回复: 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;
),
);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
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();
)
);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Edition de combo box
Merci beaucoup je vais regarder ce que cela donne
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
回复: 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;
),
);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
回复: 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.