I have a form which has a datasource containing fields 1) ID(string) 2)Name(string) 3)Amount(Real) 4) From year(int) 5) To year (int). i have taken two unbounded field for from year and toyear of combo box type and have written code for getting dropdown of year on init of form. now if i select this from year and to year and click filter button. it should filter my datasource year fields.
How can i do that??
Plz help.i tried writting code on selection change of unbound fields and call it on clicked but its not working…Kindly help.
Please look at what value you get from selection() - it returns int, so it’s the index, not the value of the combo box item.
Also, don’t add ranges every time when executeQuery() gets called - that would easily lead to adding ranges multiple times. You can use SysQuery::findOrCreateRange(), for example, to reuse the same ranges.