I have 2 combobox. The 1st combo uses a valuelist which shows all values from a table. The 2nd combo uses another valuelist. This valuelist shows related values and the relation depends on the value of the 1st valuelist. It’s ok: I select a value in the first combo and the second combo shows its related values.
But… I doesn’t work in find mode. In find mode, I select a value in the 1st combo, but nothing shows in the second combo
you may form a SQL query based on the value selected in the first combo and then use databaseManager.getDataSetByQuery() to get the dataset. Now you can use application.setValueListItems(“2nd combo valuelist name”, dataset);
I have a method FillTheValueList with a databaseManager.getDataSetByQuery() and a application.setValueListItems() to fill the valuelist of the second combo. This method is triggered with the OnDataChange event of the first combo… but there is no OnDataChange in find mode, so the method is not triggered.
Sorry I just came to know that the only event could be triggered in find mode is onAction of a button also provided that the triggered method includes the following pseudo code.
if (false) {
controller.search();
}
I want servoy to allow all the (possible) triggers of browse mode to work in the find mode.
A weird workaround for your issue would be to have a transparent button (same size as the second combo) above the second combo and in the onAction of transparent button you can call the FillTheValueList (include the psuedo above in this method)