xTuple.com xTupleU Blog & News Customer Support

How to add combobox to parameter widget

Hi there,
I need to add filter by country to parameter widget. Below is my code.

var _pw = mywindow.parameterWidget();
_pw.appendComboBox(qsTr(“Country”), “country”, XComboBox.Countries);// working and show all countries

However, i just want a limited number of countries from table vend to be in the list.

I’ve tried that code

_pw.append(qsTr(“Country”), “country”, ParameterWidget.XComBox);

but don’t know how to populate the combobox item list.

Any help will be very appreciated.


It would be something like:

_pw.appendComboBox(qsTr("Country"), "country", "<select query>");

An explicit select query is the only way I know how to fine-tune results in this context.

It works.
Thanks for help.