Combo box editingHello,
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
ScriptingRe: Edition de combo boxAssociative 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();
)
);
回复: Edition de combo boxHi
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;
),
);